mercredi 13 mai 2015

HTML Pattern for UK phone numbers

I need a pattern for my input that will accept the following style of numbers:

+44 7123456789 (13 Characters)
(01234) 123456 (11 Characters)
0 7123456789   (11 Characters)

The above patterns should be the only way the input is accepted so if they use a + character at the beginning the character count should be 13 or else if the first character is 0 it should be 11 characters long.

I don't personally understand how patterns are meant to be written so if you are creating your own custom one could you please explain what the code is doing or provide a link to the site you used to understand patterns.

Aucun commentaire:

Enregistrer un commentaire