fix: Fix password length validation

pull/295/head
Maksim Eltyshev 3 years ago
parent b476a19b79
commit 62c3cca9a7

@ -2,7 +2,7 @@ const PASSWORD_REGEX = /^(?=.*[A-Za-z])(?=.*\d).+$/;
const USERNAME_REGEX = /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/; const USERNAME_REGEX = /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/;
export const isPassword = (string) => { export const isPassword = (string) => {
return string.length >= 3 && PASSWORD_REGEX.test(string); return string.length >= 6 && PASSWORD_REGEX.test(string);
}; };
export const isUsername = (string) => { export const isUsername = (string) => {

Loading…
Cancel
Save