For the Text, Number, Phone, Email and Url fields, you can apply a formatting that will only allow values that respect the chosen layout.
We will use regular validation expressions in the Advanced tab of our column.
For example here is a regular expression to validate a French mobile phone number:
(0| +33|0033) [67]( d{8})$
Explanation:
: start of the chain
(0| +33|0033): the international telephone code of France, which can be written in three different ways: 0, +33 or 0033.
[67]: the first digit of the mobile number must be a 6 or a 7.
( d{8}): Eight digits must follow the first digit.
$: end of the chain.
This regular expression corresponds to the following mobile phone number formats:
0612345678
0712345678
+33612345678
0033612345678
+33712345678
0033712345678
Once the regular expression is entered in the column option, you cannot fill the field with a value that does not respect the format:
You can build your regular expressions by searching for guides or using tools like chatGPT but here are some common expressions to copy and paste:
French phone number: ^0[1-9]\d{8}$
SIRET Number: ^\d{14}$
Specific email address (gmail in our example): ^[a-zA-Z0-9._%+-]+@gmail\.com$