-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Validation on inputs #410
Comments
I like the idea of using
Is there anything else to account for? |
Hum, right, I think We just need to make sure there's decent default debouncing I think. |
I don’t think debouncing is necessary, as this would apply to form submission only, right?
|
Well the warning is only shown when |
I suppose we could evaluate the expression only on a |
Hmm, I'd still like for stuff like `data-on-focusout="inputId.reportValidity()" to just work. |
In that case we could give |
Added in #423. If debouncing is required, it should be added using the <input data-on-keydown__debounce.400ms="ctx.el.setCustomValidity(`Invalid`)"> |
Following a discussion on discord, I wonder if a
data-custom-validation
for input's would make any sense ? You can read aboutsetCustomValidation
here https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validationThis would be useful for stuff like cross input validation, heres a small example:
I dont mind trying to implement it myself, but I'll wait for validation ;) that it's a good idea first.
The text was updated successfully, but these errors were encountered: