1
0
forked from s421507/eOSP2

fix walidacji

This commit is contained in:
Krzysztof Strzelecki 2020-02-01 02:46:17 +01:00
parent 4788f3f62d
commit d13833f19a
2 changed files with 6 additions and 6 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',
],