Passed
Push — master ( 1277e1...543615 )
by John
05:58
created
app/Http/Controllers/Auth/RegisterController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,16 +48,16 @@
 block discarded – undo
48 48
      */
49 49
     protected function validator(array $data)
50 50
     {
51
-        $validator = [
51
+        $validator=[
52 52
             'name' => ['required', 'string', 'max:16', 'unique:users'],
53 53
             'email' => ['required', 'string', 'email', 'max:255', 'unique:users', 'allowed_email_domain'],
54 54
             'password' => ['required', 'string', 'min:8', 'confirmed'],
55 55
             'agreement' => ['required'],
56 56
         ];
57
-        $messages = [];
58
-        if(config('function.password.strong')) {
59
-            $validator['password'][] = 'regex:/^(?![A-Za-z0-9]+$)(?![a-z0-9\\W]+$)(?![A-Za-z\\W]+$)(?![A-Z0-9\\W]+$)[a-zA-Z0-9\\W]{8,}$/';
60
-            $messages['password.regex'] = __('validation.password.strong');
57
+        $messages=[];
58
+        if (config('function.password.strong')) {
59
+            $validator['password'][]='regex:/^(?![A-Za-z0-9]+$)(?![a-z0-9\\W]+$)(?![A-Za-z\\W]+$)(?![A-Z0-9\\W]+$)[a-zA-Z0-9\\W]{8,}$/';
60
+            $messages['password.regex']=__('validation.password.strong');
61 61
         }
62 62
         return Validator::make($data, $validator, $messages);
63 63
     }
Please login to merge, or discard this patch.