fix walidacji
This commit is contained in:
parent
4788f3f62d
commit
d13833f19a
@ -19,8 +19,8 @@ class RegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
$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' => 'required|email|unique:users',
|
||||||
|
@ -62,8 +62,8 @@ class fireFightersController extends Controller
|
|||||||
public function store(){
|
public function store(){
|
||||||
$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' => 'required|email|unique:users',
|
||||||
@ -111,8 +111,8 @@ class fireFightersController 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',
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user