Skip to content

Commit

Permalink
CB-4534 do not validate empty password, required attribute will
Browse files Browse the repository at this point in the history
  • Loading branch information
devnaumov committed Jan 18, 2024
1 parent 8ba0eb6 commit e99fe59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webapp/packages/core-authentication/src/usePasswordPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export function usePasswordPolicy() {
const passwordPolicyService = useService(PasswordPolicyService);

const ref = useCustomInputValidation<string>(value => {
if (!value.trim()) {
return null;
}

const validation = passwordPolicyService.validatePassword(value);
return validation.isValid ? null : validation.errorMessage;
});
Expand Down

0 comments on commit e99fe59

Please sign in to comment.