mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +01:00
add validation to form (#9691)
This commit is contained in:
parent
26186618f5
commit
0c6e296dc3
@ -42,6 +42,11 @@ export class RecoverTwoFactorComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submit = async () => {
|
submit = async () => {
|
||||||
|
this.formGroup.markAllAsTouched();
|
||||||
|
if (this.formGroup.invalid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const request = new TwoFactorRecoveryRequest();
|
const request = new TwoFactorRecoveryRequest();
|
||||||
request.recoveryCode = this.recoveryCode.replace(/\s/g, "").toLowerCase();
|
request.recoveryCode = this.recoveryCode.replace(/\s/g, "").toLowerCase();
|
||||||
request.email = this.email.trim().toLowerCase();
|
request.email = this.email.trim().toLowerCase();
|
||||||
|
Loading…
Reference in New Issue
Block a user