Permalink
Browse files

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
  • Loading branch information...
brainmaniac committed Oct 16, 2018
1 parent 9ac61ce commit 3671ad399da5e6689f3d2039a106fc0cb3ea1cec
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/Http/Controllers/Auth/RegisterController.php
@@ -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'],
]);
}

0 comments on commit 3671ad3

Please sign in to comment.