From 039ad7a3dbe49322d25caf0fb1b6229e1342a090 Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Sat, 11 Dec 2021 13:36:43 +0330 Subject: [PATCH] update validation rule --- .../UI/API/Requests/LoginProxyPasswordGrantRequest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php index 3df29f95a..b2e106b8c 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php @@ -35,7 +35,10 @@ class LoginProxyPasswordGrantRequest extends Request public function rules(): array { $rules = [ - 'password' => 'required|min:3|max:30', + // we don't need to require email here. The proper login attribute (with proper validations) + // will be added automatically by "loginAttributeValidationRulesMerger" method below + // 'email' => 'required', + 'password' => 'required', ]; return loginAttributeValidationRulesMerger($rules);