File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,13 @@ public function getRegistrationRules(): array
4646 [sprintf ('is_unique[%s.secret] ' , $ this ->tables ['identities ' ])]
4747 );
4848
49+ $ passwordRules = $ this ->getPasswordRules ();
50+ $ passwordRules ['rules ' ][] = 'strong_password[] ' ;
51+
4952 return [
5053 'username ' => $ usernameValidationRules ,
5154 'email ' => $ emailValidationRules ,
52- 'password ' => $ this -> getPasswordRules () ,
55+ 'password ' => $ passwordRules ,
5356 'password_confirm ' => $ this ->getPasswordConfirmRules (),
5457 ];
5558 }
@@ -69,7 +72,7 @@ public function getPasswordRules(): array
6972 {
7073 return [
7174 'label ' => 'Auth.password ' ,
72- 'rules ' => 'required| ' . Passwords::getMaxLengthRule () . ' |strong_password[] ' ,
75+ 'rules ' => [ 'required ' , Passwords::getMaxLengthRule ()] ,
7376 'errors ' => [
7477 'max_byte ' => 'Auth.errorPasswordTooLongBytes ' ,
7578 ],
You can’t perform that action at this time.
0 commit comments