fix(FE): remove unnecessary complexity from password check (#1904)

Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
This commit is contained in:
Marius Kimmina 2022-12-26 11:32:18 +01:00 committed by GitHub
parent 02898d14f9
commit 1cceab4d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,10 +6,8 @@
*/
export const isPasswordValid = (value: string): boolean => {
// eslint-disable-next-line prefer-regex-literals
const pattern = new RegExp(
'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$',
);
const pattern = new RegExp('^.{8,}$');
return pattern.test(value);
};
export const isPasswordNotValidMessage = `Password must a have minimum of 8 characters with at least one lower case, one number ,one upper case and one special character`;
export const isPasswordNotValidMessage = `Password must a have minimum of 8 characters`;