changed syntax for validation
Changed the syntax for the validation to be more aligned to the proposed way of implementing custom validations in the docs: https://laravel.com/docs/5.7/validation#custom-validation-rules
This commit is contained in:
parent
9ac61ced01
commit
3671ad399d
|
@ -49,9 +49,9 @@ public function __construct()
|
||||||
protected function validator(array $data)
|
protected function validator(array $data)
|
||||||
{
|
{
|
||||||
return Validator::make($data, [
|
return Validator::make($data, [
|
||||||
'name' => 'required|string|max:255',
|
'name' => ['required', 'string', 'max:255'],
|
||||||
'email' => 'required|string|email|max:255|unique:users',
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||||
'password' => 'required|string|min:6|confirmed',
|
'password' => ['required', 'string', 'min:6', 'confirmed'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue