update password validator
This commit is contained in:
@@ -57,19 +57,11 @@ export class LoginComponent implements OnInit {
|
||||
}
|
||||
|
||||
checkPattern(pw: string): boolean {
|
||||
if (pw.length < 8) {
|
||||
return false;
|
||||
}
|
||||
if (!/\d/.test(pw)) {
|
||||
return false;
|
||||
}
|
||||
if (!/[A-Z]/.test(pw)) {
|
||||
return false;
|
||||
}
|
||||
if (!/[a-z]/.test(pw)) {
|
||||
return false;
|
||||
}
|
||||
if (!/[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(pw)) {
|
||||
if (pw.length < 8 ||
|
||||
!/\d/.test(pw) ||
|
||||
!/[A-Z]/.test(pw) ||
|
||||
!/[a-z]/.test(pw) ||
|
||||
!/[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(pw)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user