Closed acstll closed 8 years ago
Isn't this a pretty simple fix? Just moving it into $.fn.validity
?
Maybe, I'm not sure is that easy, though should be a simple fix indeed.
The problem is that if you have more than one form
element in your selection (if you do $('form').validity()
for example), all fields of all forms would be in that same "global" variable, which would make all forms run validation logic while the user is interacting with only one.
Would you mind copy/pasting an example of what you mean? There are no proper tests to check against right now, but if you feel like trying a PR, that is also welcomed :-)
https://github.com/acstll/jquery-validity/blob/master/index.js#L12