* Core: progress on removing aria-describedby from valid fields
* core: aria-describedby
* Core: remove aria-describedby when hiding error
* Core: fix syntax issues, Test: add test for new setting
* Core: Fix bugs in aria-describedby behavior and related tests
* Core: bugfix for labels without id
* Core: don't create a new error element if one exists
* Core: progress on test for group of fields with ariaDescribedbyCleanup
* Core: Groups aria-describedby
* Core: fix aria-describedby not being removed from grouped fields
Ensure that aria-describedby is removed from all members of a group when
all the known errors are resolved
* Core: Update capitalization
* Demo: Add page for ariaDescribedByCleanup
* Core: add setting to remove aria-describedby from valid fields
Includes additional unit tests and a demo page
* Core: Fix camel case inconsistency, remove stray comment
* Update demo/css/cmxform.css
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Kieran <kieran.brahney@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed === compare, changed to ==
Compare by value and type (===) does not work for this algorithm, as both cd and cdv can be either types at the same time.
By comparing by value only (==) cd and cdv can be either integer or string, as a string number will be converted to a number reqardless of type.
* Rewrote forloop, removed nested forloop
* Additional: fixed spacing issues
* Additional: Add vinUS.js validation test cases
Test cases include default test with 17 one's, and additional US and Canada VIN
* Additional: add two more test casses for vinUS
* Additional: removed text license number, should be VIN
* Tests: Add tests for integers.
* Core: Unbind the event and remove the class name.
* Test: Test binding of blur event.
* Test: Test binding of blur event.
Non-Firefox browsers dispatch "click" on descendants of <button>, which breaks
the submitHandler logic that adds a hidden field with the name and value of the
submit button (since it is not included in the submission if it did not
initiate the submission, which might be the case when using form.submit in
submitHandler and returning false). submitButton is instead a descendant of
<button> and the hidden field does not compensate for the lack of an actual
submit button.
This would fix crbug.com/668524 and make submitButton an actual button.
* Added HTML for button with descendants test
For testing that clicking on descendants of a button element still keeps the button element as the submit button.
* Added a test for button with descendants support
For testing that clicking on descendants of a button element still
keeps the button element as the submit button.
* Removed an extraneous submission from the test
Accidental copy-paste.
* Fixed some style warning
Forgot to wrap the parenthesized value with spaces.
* Fixed a style warning
Forgot to wrap a parenthesized value with spaces.
* Fixed a style warning
Forgot to add a blank line above a comment.
* Fixed the button with descendants test
Replaced a complex event initiation with a basic click().
* Fixed a style warning
Removed extraneous trailing spaces.
* Fixed some style warnings
Removed two unused variables.
* Fixed a submitButton regression
Instead of returning a DOM element, a jQuery element was returned.
Changed to return the original element in the target is already a button case.
* Simplified the button with descendants support
Instead of looking for the parent or ancestor of the target,
just used the currentTarget property.
* Added another test
Devised by @Arkni.
When a field has one rule with option `depends` specified and this
dependency mismatch, the plugin will remove it, so that field will not be
validated on submit by the the rule in question. So if that field is
already invalid, only the error message will be hidden and the error class
will remain.
This commit fixes this issue.
Fixes#1632
When using the `valid` method on a list of inputs and there is an ignored
input in that list, the errorList is not cleared causing it to slowly
growing larger and larger when calling `valid` several times.
Fixes#1618
The user can change the value of an element before validating
the element in question. The new value will be then used by
the associated methods instead of the `real one`.
Closes#1602
The error ID was being escaped for use in a regex, but these escaped
characters were also being passed on to the aria-describedby value
set in the HTML, which means the ID doesn't match up with the ID of
the element it's referring to.
Fixes#1523Closes#1587
Replaces validateDelegate method with jQuery's on() method. This raises
the minimum supported jQuery version to 1.7.0, dropping support for 1.6.
Closes#1392
This regressed at some point, probably when rules-as-data-attributes where
introduced, since those are automatically parsed as JSON. For the unprocessed
attributes, the array brackets have to be removed.
Also fixes the milk demo, which specified rangelength as the message, instead of
minlength, which it actually uses.
Fixes#1087