ch***********@hotmail.com (Chris) writes:
How would I go about validating multiple textfields within the same
form to ensure they start with either 1 or 2 numerical digits (from 8
to 14) followed by 2 or 3 text characters eg. 8MN and 14ABC being
acceptable?
Try this regular expression
var re = /^([89]|1[0-4])[A-Z]{2,3}$/;
You can test a field value against it:
if (!re.test(fieldRef.value)) {
// do error handling
}
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'