Validating phone numbers
At Purse Identity, we use a dedicated library to validate a user’s phone number.
Since January 2022, all newly-created accounts where no country code is provided at creation have their default country code set to FR |
Validation rules
If no country code is provided in the user’s phone number, the country code in your Purse Identity Console account settings is prepended to the phone number before validation.
If there is no country code provided (either via the Purse Identity Console and/or through user input), the validation library throws an exception and the phone number is considered invalid.
Here are some examples of valid phone numbers with country codes:
| Number | Notes | ||
|---|---|---|---|
+33612345678 |
International format, valid French mobile number structure. Starts with +33 (France) and 6 (mobile prefix). No leading zero, suitable for global use. |
||
(+33)612345678 |
Correct international format with optional parentheses. Starts with (+33) (France) and 6 (mobile prefix). |
||
06123456789 |
Domestic format, valid French mobile number structure. Starts with 0 followed by 6 (mobile prefix), totaling 10 digits. Suitable for local use in France.
|
