diff --git a/src/Authentication/Passwords.php b/src/Authentication/Passwords.php index 3eca6c71f..3a5b7b041 100644 --- a/src/Authentication/Passwords.php +++ b/src/Authentication/Passwords.php @@ -143,7 +143,7 @@ public function check(string $password, ?User $user = null): Result /** * Returns the validation rule for max length. */ - public static function getMaxLenghtRule(): string + public static function getMaxLengthRule(): string { if (config('Auth')->hashAlgorithm === PASSWORD_BCRYPT) { return 'max_byte[72]'; diff --git a/src/Controllers/LoginController.php b/src/Controllers/LoginController.php index dc78426d7..dd27b97bf 100644 --- a/src/Controllers/LoginController.php +++ b/src/Controllers/LoginController.php @@ -93,7 +93,7 @@ protected function getValidationRules(): array ], 'password' => [ 'label' => 'Auth.password', - 'rules' => 'required|' . Passwords::getMaxLenghtRule(), + 'rules' => 'required|' . Passwords::getMaxLengthRule(), 'errors' => [ 'max_byte' => 'Auth.errorPasswordTooLongBytes', ], diff --git a/src/Controllers/RegisterController.php b/src/Controllers/RegisterController.php index 6f394faa0..500b1ea36 100644 --- a/src/Controllers/RegisterController.php +++ b/src/Controllers/RegisterController.php @@ -197,7 +197,7 @@ protected function getValidationRules(): array ], 'password' => [ 'label' => 'Auth.password', - 'rules' => 'required|' . Passwords::getMaxLenghtRule() . '|strong_password', + 'rules' => 'required|' . Passwords::getMaxLengthRule() . '|strong_password', 'errors' => [ 'max_byte' => 'Auth.errorPasswordTooLongBytes', ],