This small fix will enable non-HTML5 browsers to return a boolean true from the .prop() call in .attributeRules() - eliminating the need to do browser detection and attribute/class manipulation during $(document).ready().
This change will fix the currently open issue #301
Non HTML5 browsers will now validate automatically from a "required" …
Paul, I just tested this on Firefox 3.6 and it does not behave correctly. Specifically, the attribute is empty which on non-HTML5 browsers will not return a boolean true on attribute access, but technically it is still defined (though it's a "falsy" value).
Could you revise this to handle this case? Thanks.
Just to add, this is certainly a bug as our original code and tests fail under this browser and need to be fixed, so handling an an attribute that has the empty string as a value rather than undefined will help us fix this.
I'll see what I can do, and thanks for the feedback.
fallback to native js for browsers returning undefined when accessing…
… required attr with .prop() or .attr()
Merge remote branch 'upstream/master'
It appears that firefox 3.6 has some issues with respect to this attribute, see the following:
My own testing on this browser showed that custom attributes would return their values (with $.attr() at least) but "required" always returned undefined. Which is annoying to say the least.