I have a regex to validate phone numbers. It should allow only +
, (
, )
and -
symbol in it. Right now everything works fine except for 2 issues. The regex should allow +
symbol only at the beginning and not anywhere in the middle.
the other symbols, ie: -
, (
and )
symbols should not appear one after another.
regex used is as follows
/^(?=.*?[1-9])[0-9-()+ ]+$/
any suggestions to fix this would be helpful.