Validate to accept UK phone numbers only
I am wanting to validate a form field to accept UK phone numbers only and I assume I need to use regular expressions to achieve this but I am alien to using regular expressions. Subsequently I found websites with examples to use. I have tried the following:
"/^(\+44\s?7\d{3}|\(?07\d{3}\)?)\s?\d{3}\s?\d{3}$/"
But it doesn't seem to work.
It supposedly should accept the following.
07222 555555
(07222) 555555
+44 7222 555 555
Any ideas as to where I am going wrong?
I've attached the page if it helps.
Thanks in advance.