From fa5812dc2f26f017f696d5b32a7532b1c7bd28df Mon Sep 17 00:00:00 2001 From: Krzysztof Strzelecki Date: Sat, 1 Feb 2020 03:53:59 +0100 Subject: [PATCH] walidacja fix --- app/Http/Controllers/userProfileController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/userProfileController.php b/app/Http/Controllers/userProfileController.php index 567beee..0c6772c 100644 --- a/app/Http/Controllers/userProfileController.php +++ b/app/Http/Controllers/userProfileController.php @@ -39,8 +39,8 @@ class userProfileController extends Controller public function update(){ $this->validate(request(), [ - 'name' =>'required|min:2|max:45|regex:/^[\p{L}\040\x27-]+$/', - 'surname' =>'required|min:2|max:45|regex:/^[\p{L}\040\x27-]+$/', + 'name' =>'required|min:2|max:45|regex:/^[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ\040\x27-]+$/', + 'surname' =>'required|min:2|max:45|regex:/^[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ\040\x27-]+$/', 'PESEL' => new Pesel, 'phoneNumber' => 'required|digits:9', 'email' => 'required|email|unique:users,email,'.auth()->user()->id, //wymagaj unikalnego adresu email ale pozwól na zachowanie starego adresu