feature: #56 custom tegex for arguments (#244)

This commit is contained in:
James Read
2024-03-08 22:17:10 +00:00
committed by GitHub
parent 2fb40ff443
commit c97fd60c25
2 changed files with 19 additions and 6 deletions

View File

@@ -108,6 +108,11 @@ class ArgumentForm extends window.HTMLElement {
domEl.setAttribute('step', '1')
} else {
domEl = document.createElement('input')
if (arg.type.startsWith(':regex')) {
domEl.setAttribute('pattern', arg.type.replace('regex:', ''))
}
domEl.onchange = () => {
const validateArgumentTypeArgs = {
value: domEl.value,