samedi 19 mai 2018

word start with uppercase (unicode) in laravel validation

I need check that word start from Uppercase (for name of user) and it should work in not only English language (first of all, in Russian).

Now I have next code:

$data_user  = $this->validate($request, [
    'name'=>'required|regex:/^[\p{Lu}][\p{Ll}]*$/',
]);

It's work as I want in this service but it doesn't work in Laravel validation. How fix my code or we can't do it in laravel validation?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2rUD0q9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire