diff --git a/webapp/packages/core-authentication/src/usePasswordPolicy.ts b/webapp/packages/core-authentication/src/usePasswordPolicy.ts index fed5237589..ebe6ca4687 100644 --- a/webapp/packages/core-authentication/src/usePasswordPolicy.ts +++ b/webapp/packages/core-authentication/src/usePasswordPolicy.ts @@ -14,6 +14,10 @@ export function usePasswordPolicy() { const passwordPolicyService = useService(PasswordPolicyService); const ref = useCustomInputValidation(value => { + if (!value.trim()) { + return null; + } + const validation = passwordPolicyService.validatePassword(value); return validation.isValid ? null : validation.errorMessage; });