walidacja fix
This commit is contained in:
parent
d13833f19a
commit
fa5812dc2f
@ -39,8 +39,8 @@ class userProfileController extends Controller
|
|||||||
|
|
||||||
public function update(){
|
public function update(){
|
||||||
$this->validate(request(), [
|
$this->validate(request(), [
|
||||||
'name' =>'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:/^[\p{L}\040\x27-]+$/',
|
'surname' =>'required|min:2|max:45|regex:/^[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ\040\x27-]+$/',
|
||||||
'PESEL' => new Pesel,
|
'PESEL' => new Pesel,
|
||||||
'phoneNumber' => 'required|digits:9',
|
'phoneNumber' => 'required|digits:9',
|
||||||
'email' => 'required|email|unique:users,email,'.auth()->user()->id, //wymagaj unikalnego adresu email ale pozwól na zachowanie starego adresu
|
'email' => 'required|email|unique:users,email,'.auth()->user()->id, //wymagaj unikalnego adresu email ale pozwól na zachowanie starego adresu
|
||||||
|
Loading…
Reference in New Issue
Block a user