Revert if condition validatePassword func on validation-utils.ts

pull/13154/head^2
Mahmut Gundogdu 3 years ago
parent da0fe2246a
commit 2b28c0f44f

@ -65,9 +65,9 @@ function validatePassword(shouldContain: 'small' | 'capital' | 'number' | 'speci
};
const regex = regexMap[shouldContain];
const hasError = regex.test(value);
const isValid = regex.test(value);
if (!hasError) {
if (isValid) {
return null;
}

Loading…
Cancel
Save