-
Notifications
You must be signed in to change notification settings - Fork 36
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
Check validity of form #80
Comments
Yes. You can do a hyperform.checkValidity(my_form) which is basically the same as what you'd expect: https://github.com/hyperform/hyperform/blob/master/src/polyfills/checkValidity.js#L15 The canonical call is my_form.checkValidity() which is supported, too, and works according to the specification. I'm keeping the issue open, because you're right, I haven't mentioned that in the docs, which I need to fix. |
Thanks, unfortunately it doesn't work in my use case (which admittedly, looks like an edge case). I have a long form which I'm splitting out into chunks, I want to validate each chunk before showing the next one so my element is a div rather than a form (to avoid validating fields which aren't even displayed yet). |
HTML has you covered there, too :-) If you can, use a Edit: Hm. From looking at the code, it could be, that Hyperform doesn't fully support |
As promised in hyperform/hyperform#80
Is it possible to check the validity of the form as a whole? I've had a look through the documentation and can't find what I need. If not then I'm assuming I would have to loop through all the fields and check each one?
The text was updated successfully, but these errors were encountered: