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
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
Avoid revalidate the field when pressing one of the following keys
in 'onkeyup' method:
Shift => 16
Alt => 18
Caps lock => 20
End => 35
Home => 36
Left arrow => 37
Up arrow => 38
Right arrow => 39
Down arrow => 40
Insert => 45
Num lock => 144
AltGr key => 225
This helps especially with the remote method, which has a lot of
overhead.
Closes#1411
Invalid element is not focused when validate a custom set of inputs and
the last one is a valid input. The issue is element method, via
prepareElement method, via reset method, resets errorList state after
validate each input so the global state of the validator is not
preserved.
Closes#1327
When use a custom highlight functions which for example place the error
class in a different element (like Bootstrap form-group wrapper) this
element are not unhighlighted after resetForm.
Closes#1323
In 1.10.0, min/max validation was supported for input type="text",
where min/max were interpreted as numbers. This means min/max
for date would not work: min="2012-02-13" was interpreted as min="Not a Number".
In 1.11.0, min/max were no longer converted to numbers. This means
min/max for dates worked, but min/max for numbers failed:
"50" < "150" < "1000" does not hold.
For an example, see http://jsbin.com/awokex/3
This commit makes the behaviour of min/max dependent on input type:
* input type=text (or not type attribute) has numeric min/max, as in 1.10.0
* input type=date has working min/max for type date;
on mobile browsers you also get a date picker,
plus the browser may reject invalid dates before
javascript gets a chance to complain.
* input type=number or range get numeric min/max,
plus numeric keypad or slider on mobile browsers,
plus browser may reject invalid input before javascript
gets a chance to complain
Allowing use of min/max with type=number/range/date is important
for mobile browsers, where the numeric keypad or date picker
make the input much easier to use than a generic text input field.
In this situation jquery-validate remains necessary to support
older browsers that do not do input validation based on type
and min/max.
For situations where numeric input should be validated by jquery
without giving the browser a chance to validate the input format,
input type=text in combination with min/max can be used, as in 1.10.0.