JavaScript: validating phone number so it starts with pre-defined digits
using JavaScript (jQuery) I 'd like to validate a phone number 9 - 11 digits long, of which the starting digits should be one of the following 01 , 02, 075, 077, 078, 079 and do it live, but somehow not sure where to start. Could anyone help please?
I have come up with this one eventually and it works for me. Nevertheless, thank you very much for your help!! And apologize for not tending the question in time.
Try matching on the following Regular Expression:
(01|02)\d{7,9}|(075|077|07