Closed jailengarcia closed 10 years ago
Just checked in the specs http://www.w3.org/TR/html-markup/input.number.html It deals with floating-point numbers, not hex/octal as far as I can see. So you what you can add your custom validator for a type. Something like:
$.setCustomInputTypeValidator( "Octal", "Please enter a valid octal number", function() {
var pattern = /^[\da-f]+$/i;
return !$( this ).val() || pattern.test( $( this ).val() );
});
Or with min
/max
as it is done for Number
Input of type number, fail with this value "45fff".