mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-24 12:13:59 +01:00
Remove clearing as numbers of min, max and range rules. Fixes #455. Closes gh-528.
These rules are fully suitable to check any comparable JavaScript objects such as strings or dates. Also clearing prevents HTML5 date input fields to work when these rules are coming from HTML.
This commit is contained in:
committed by
Jörn Zaefferer
parent
a047634196
commit
69831a08cf
@@ -205,7 +205,7 @@ test("rules(), add and remove", function() {
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, minlength: 2, maxlength: 5, customMethod1: "123" });
|
||||
|
||||
$("#v2-i5").addClass("email").attr({min: 5});
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, email: true, minlength: 2, maxlength: 5, min: 5, customMethod1: "123" });
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, email: true, minlength: 2, maxlength: 5, min: "5", customMethod1: "123" });
|
||||
|
||||
$("#v2-i5").removeClass("required email").removeAttrs("minlength maxlength customMethod1 min");
|
||||
deepEqual( $("#v2-i5").rules(), {});
|
||||
|
||||
Reference in New Issue
Block a user