File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed
Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,7 @@ use CodeIgniter\API\ResponseTrait;
150150use CodeIgniter\HTTP\ResponseInterface;
151151use CodeIgniter\Shield\Authentication\Authenticators\Session;
152152use CodeIgniter\Shield\Authentication\JWTManager;
153- use CodeIgniter\Shield\Authentication\Passwords;
154- use CodeIgniter\Shield\Config\AuthSession;
153+ use CodeIgniter\Shield\Validation\ValidationRules;
155154
156155class LoginController extends BaseController
157156{
@@ -215,19 +214,9 @@ class LoginController extends BaseController
215214 */
216215 protected function getValidationRules(): array
217216 {
218- return setting('Validation.login') ?? [
219- 'email' => [
220- 'label' => 'Auth.email',
221- 'rules' => config('Auth')->emailValidationRules,
222- ],
223- 'password' => [
224- 'label' => 'Auth.password',
225- 'rules' => 'required|' . Passwords::getMaxLengthRule(),
226- 'errors' => [
227- 'max_byte' => 'Auth.errorPasswordTooLongBytes',
228- ],
229- ],
230- ];
217+ $rules = new ValidationRules();
218+
219+ return $rules->getLoginRules();
231220 }
232221}
233222```
You can’t perform that action at this time.
0 commit comments