I have a text box named id. I need to form a text box validator where I want the id number in the text box to be of the format a letter, followed by 3 numbers (each in range 0-8), a separator “+” or “-“, and another 4 numbers (each 0-9).
Can anyone tell me how I could write this regular expression validator in javascript…
Any help is appreciated. Thanks
I have a text box named id. I need to form a text box
Share
As they pointed out above, this would be a great exercise to learn how to do regexes yourself. However, in the interest of being helpful, here is the regex you need: