1
0
forked from s421507/eOSP2

walidacja fix

This commit is contained in:
Krzysztof Strzelecki 2020-02-01 03:53:59 +01:00
parent d13833f19a
commit fa5812dc2f

View File

@ -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