Skip to content

Commit

Permalink
Update password_helper.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolacerda authored Mar 26, 2024
1 parent 63bd207 commit 0534b12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/password_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export function GeneratePassword(length: number = 8): string {
return password;
}
export function IsValid(password: string): boolean {
const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;
// 16 char, at least 3 special characters and 3 numbers
const regex = ;
return regex.test(password);
}

0 comments on commit 0534b12

Please sign in to comment.