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:
brainmaniac 2018-10-16 22:36:12 +02:00 committed by GitHub
parent 9ac61ced01
commit 3671ad399d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -49,9 +49,9 @@ public function __construct()
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
]);
}