From 3671ad399da5e6689f3d2039a106fc0cb3ea1cec Mon Sep 17 00:00:00 2001 From: brainmaniac Date: Tue, 16 Oct 2018 22:36:12 +0200 Subject: [PATCH] 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 --- app/Http/Controllers/Auth/RegisterController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index e749c077..0e8d66aa 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/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'], ]); }