In Laravel 5.6 I am validating alphabetic characters and spaces only in regex like this..
'name' => 'required|regex:/^[\pL\s\-]+$/u',
This works as far as I can see, I am now trying to validate numbers only and spaces like this..
'telephone' => 'required|regex:/[0-9 ]+/',
But this is not working and allows me to enter 'f4' where it should fail.
Where am I going wrong?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire