1
0
mirror of https://github.com/bitwarden/web synced 2026-01-02 08:33:18 +00:00

Add error summary

This commit is contained in:
Hinton
2022-05-23 15:27:49 +02:00
parent aa7fb1befb
commit 8d369bcf84
3 changed files with 13 additions and 0 deletions

View File

@@ -37,6 +37,8 @@
<bit-label>{{ "identifier" | i18n }}</bit-label>
<input bitInput type="text" formControlName="identifier" />
</bit-form-field>
<bit-error-summary *ngIf="showErrorSummary" [formGroup]="formData"></bit-error-summary>
</div>
<div class="col-6">
<app-avatar

View File

@@ -42,6 +42,7 @@ export class AccountComponent {
org: OrganizationResponse;
formPromise: Promise<any>;
taxFormPromise: Promise<any>;
showErrorSummary = false;
private organizationId: string;
@@ -99,6 +100,7 @@ export class AccountComponent {
async submit() {
this.formData.markAllAsTouched();
this.showErrorSummary = true;
if (!this.formData.valid) {
return;

View File

@@ -5072,5 +5072,14 @@
},
"inputEmail": {
"message": "Input is not an email-address."
},
"fieldsNeedAttention": {
"message": "$COUNT$ fields above need your attention.",
"placeholders": {
"count": {
"content": "$1",
"example": "4"
}
}
}
}