Hello. There is a field to fill in the mobile phone number <input type="tel" name="phone">
, in which you can enter the phone in either the international format (+375111111, +375 111 111, + 375-111-111), or local (8111111, 8 11 11, 8-11-11), i.e. it is allowed to use numbers, space, hyphen and plus, but my check fails - I write:
<input type="tel" name="phone" value="" size="40" required data-validation-regexp="\+?\(?\d{2,4}\)?[\d\s-]{3,}">
Where is the mistake?
+dddddddd
validates+dddddddd
, you need to backslash. - Vesper+dddddddd
also swears ... - Vasya^(?:8[ -]?\d{2}[ -]?\d{2}(?:[ -]?\d{2})?|\+\d{3}[ -]?\d{3}[ -]?\d{3})$
? - Wiktor Stribiżew