mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
add validation to form (#9691)
This commit is contained in:
@@ -42,6 +42,11 @@ export class RecoverTwoFactorComponent {
|
||||
}
|
||||
|
||||
submit = async () => {
|
||||
this.formGroup.markAllAsTouched();
|
||||
if (this.formGroup.invalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const request = new TwoFactorRecoveryRequest();
|
||||
request.recoveryCode = this.recoveryCode.replace(/\s/g, "").toLowerCase();
|
||||
request.email = this.email.trim().toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user