diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index e352294..34e26f9 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -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;