i’m trying to validate a credit card security number, i’ve set the max length to 3 but i need to make sure that the users enters at least 3 and i cant find any minlength ways to do it.
Security: <input type="text" name="secno" maxlength="3">
var n=document.forms["myForm"]["secno"].value;
if (n==null || n=="" || isNaN(n)) {
alert("Security number needed");
return false;
}
This will do: