I need a javascript to validate that a number was entered into my web form in one of the fields.
Attached is a web signup form. This is a simple html form my? site visitors use to signup for a mailing list, however they must provide an order number before they can signup. The problem is that my form does not check for a number so people are signing up without ordering first.
I want to add javascript to the form so that it checks the order number field to make sure it contains a number of the right length and format such as
these examples
A5GABXFDJC76
A5GABXPGCN71
W96AAXDTTL63
EJ28PAYTHF62?
It does not have to validate anything, just make sure the input is 12 characters long and has the? a letter at the start and a number at the end and at least 2 letters are somewhere in the middle.? The script should also reject a? blank field.
If the number is not valid then when the user clicks the button a popup says "Unable to Validate This Number", and if if does pass the test they continue as usual.
I think it is a pretty simple javascript, let me know what you can do.
Thanks