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?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Nf0Wi0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire