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