mercredi 31 juillet 2019

LARAVEL phone begins with 05 or 06 "preg_match(): No ending delimiter '/' found"

I'm using LARAVEL 5.5, I want to test the regex to my phone number weather the number begins with 05 or 06 and number length should be 9.

per example, if the number is 068852123 or 0522321485.

there is my code below :

'telephone_1' => 'required|regex:/(05)|(06)[0-9]{8}/',

what's wrong with this code?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire