You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

"min" attribute tiggers minimum value validation Created May 20, 2010

This thread is solved

Views: 3584     Replies: 5     Last reply Dec 1, 2011  
You must login first before you can use this feature

blackpond

Posts: 7

Registered:
Nov 20, 2008

"min" attribute tiggers minimum value validation

Posted: May 20, 2010

Setting the date range with the min attribute, for example:

<input name="thedate" type="date" data-value="1980-01-01" min="-29565" />

will trigger the min acceptable value validation script when using form validation. Of course, as the input will be a date string, the user will never be able to pass validation on this field.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» "min" attribute tiggers minimum value validation

Posted: May 26, 2010

Reply to: "min" attribute tiggers minimum value validation, from blackpond
yea. this is an issue and needs to be fixed. thanks!

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» "min" attribute tiggers minimum value validation

Posted: Jun 7, 2010

Reply to: "min" attribute tiggers minimum value validation, from blackpond
this is now fixed on github, see:

http://github.com/jquerytools/jquerytools/commit/7c092958f7c9f9f98d744fb94f11c91bb5eccfe9

will be public in 1.2.3.

Thank you for the issue!

fetchak

Posts: 3

Registered:
Oct 4, 2010

» » "min" attribute tiggers minimum value validation

Posted: Oct 4, 2010

Reply to: » "min" attribute tiggers minimum value validation, from tipiirai
Looks like this bug popped up again... here's the fix:


--- validator.js	2010-10-04 12:35:47.000000000 -0400
+++ validator.js.fixed	2010-10-04 13:33:21.000000000 -0400
@@ -231,7 +231,7 @@
 	v.fn("[max]", "Please enter a value smaller than $1", function(el, v) {
 			
 		// skip empty values and dateinputs
-		if (v === '' || dateInput && el.is(":date")) { return true; }	
+		if (v === '' || $.tools.dateinput && el.is(":date")) { return true; }	
 		
 		var max = el.attr("max");
 		return parseFloat(v) <= parseFloat(max) ? true : [max];
@@ -240,7 +240,7 @@
 	v.fn("[min]", "Please enter a value larger than $1", function(el, v) {
 
 		// skip empty values and dateinputs
-		if (v === '' || dateInput && el.is(":date")) { return true; }
+		if (v === '' || $.tools.dateinput && el.is(":date")) { return true; }	
 
 		var min = el.attr("min");
 		return parseFloat(v) >= parseFloat(min) ? true : [min];