Created
January 31, 2020 10:41
-
-
Save grandmanitou/3a79ff3f938e2cff3076fe74c944a5b3 to your computer and use it in GitHub Desktop.
Laravel validation rule for french phone number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'phone' => [ | |
'nullable', | |
'regex:/^(?:(?:\+|00)33|0)\s*[1-9](?:[\s.-]*\d{2}){4}$/' | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment