-
Notifications
You must be signed in to change notification settings - Fork 125
Not validating a field? #26
Comments
The best way right now is:
Right now h5Validate ignores the novalidate and formnovalidate attributes because it uses them to override native browser behaviors. This is likely to change before 1.0 release, if we can figure out how to cleanly override or fall back on native browser behaviors, AND keep to the validation UI best practices we've discovered in real production e-commerce applications. |
I'm not using the required or pattern attribute on these fields. The problem i have is that they are being marked as "valid" and getting the valid class, i'd like to avoid that. |
Cool. This is going on my todo list. I need to figure out the best way to do this. As far as I know, the only way to override browser validation behaviors is to set novalidate and formnovalidate, so I can't use those AND override the native browser validation behaviors (which right now are quite primitive in terms of UI behavior). Maybe we can add a .novalidate class or something? This requires a little thought. |
Adding a .novalidate class would probably be the simplest and most compatible way to do this, doing it in JS can be done by just adding the class to the element we don't need, and it can of course also be in the markup. I'm voting for class +1 for now :-) Of course, it makes more sense to not validate a field that has no reason to be validated, but as you say, that require more thought. |
It could also be a setting, though it's probably a bit more messy. |
Yeah, I think I will do the class. |
Hi again :-)
I'm trying to make h5 not validate specific fields in a form.
Yet using :not() or .not() does not work. Is there any other way i can make h5 ignore specific fields?
The text was updated successfully, but these errors were encountered: