very light client-side validation for phone
This commit is contained in:
parent
090a247ba9
commit
abe62398b6
1 changed files with 3 additions and 19 deletions
|
@ -1,23 +1,7 @@
|
||||||
-# Allowed formats:
|
-# Allowed formats:
|
||||||
-# 0123456789
|
-# very light validation is made client-side
|
||||||
-# 01 23 45 67 89
|
-# stronger validation is made server-side
|
||||||
-# 01.23.45.67.89
|
|
||||||
-# 0123 45.67.89
|
|
||||||
-# 0033 123-456-789
|
|
||||||
-# 0035 123-456-789
|
|
||||||
-# 0033 123-456-789
|
|
||||||
-# 0033(0)123456789
|
|
||||||
-# +33-1.23.45.67.89
|
|
||||||
-# +33 - 123 456 789
|
|
||||||
-# +33(0) 123 456 789
|
|
||||||
-# +33 (0)123 45 67 89
|
|
||||||
-# +33 (0)1 2345-6789
|
|
||||||
-# +33(0) - 123456789
|
|
||||||
-# +1(0) - 123456789
|
|
||||||
-# +2 123456789
|
|
||||||
-# 012345678
|
|
||||||
-# 01234567890
|
|
||||||
= form.phone_field :value,
|
= form.phone_field :value,
|
||||||
placeholder: champ.libelle,
|
placeholder: champ.libelle,
|
||||||
required: champ.mandatory?,
|
required: champ.mandatory?,
|
||||||
pattern: "([\\+\\d\\(][\\(\\)\\s\\.\\-\\d]{4,}\\d)"
|
pattern: "[^a-z^A-Z]+"
|
||||||
|
|
Loading…
Reference in a new issue