Skip to content

Commit a4b443f

Browse files
committed
Merge pull request victorjonsson#106 from hslee87/patch-2
Update jquery.form-validator.js
2 parents 64ec4dd + 7506ec5 commit a4b443f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

form-validator/jquery.form-validator.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,11 @@
948948
if (range.length == 2 && (value < parseInt(range[0],10) || value > parseInt(range[1],10) ) )
949949
{ return [ "out", range[0], range[1] ] ; } // value is out of range
950950
else if (rangeAllowed.indexOf('min') === 0 && (value < minmax ) ) // min
951-
{ return ["min", minmax]; } // value is below min
952-
else if (rangeAllowed.indexOf('max') === 0 && (value > minmax ) ) // max
953-
{ return ["max", minmax]; } // value is above max
951+
{ return ["min", minmax]; } // value is below min
952+
else if (rangeAllowed.indexOf('max') === 0 && (value > minmax ) ) // max
953+
{ return ["max", minmax]; } // value is above max
954+
else if (range.length == 1 && value != parseInt(range[0],10))
955+
{ return ["out", range[0]]; } // value is not met to required length.
954956
else { return [ "ok" ] ; } // value is in allowed range
955957
},
956958

0 commit comments

Comments
 (0)