1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-18 02:41:15 +02:00

add validation to form (#9691)

This commit is contained in:
Jake Fink 2024-06-17 17:23:25 -04:00 committed by GitHub
parent 26186618f5
commit 0c6e296dc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();