This commit is contained in:
czup 2020-02-01 06:24:26 +01:00
commit 5e3f2b663d
3 changed files with 8 additions and 8 deletions

View File

@ -19,8 +19,8 @@ class RegistrationController extends Controller
{
$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',

View File

@ -62,8 +62,8 @@ class fireFightersController extends Controller
public function store(){
$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',
@ -111,8 +111,8 @@ class fireFightersController 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',
],

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