Skip to content

Commit

Permalink
feat(dsp-app): fixed wrong error-messages in update forms (#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricSommerhalder committed Jun 20, 2023
1 parent 152ca06 commit c9e5d3f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
Expand Up @@ -34,9 +34,12 @@
>New value must be a decimal value.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required')">
<mat-error *ngIf="valueFormControl.hasError('required') && mode !== 'update'">
A decimal value is <strong>required</strong>.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required') && mode === 'update'">
Empty values are not supported when updating a value. Consider using the delete button instead.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('duplicateValue')">
<span class="custom-error-message"
>This value already exists for this property. Duplicate
Expand Down
Expand Up @@ -48,8 +48,11 @@
>New value must be different than the current value.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required')">
A GeoName value is <strong>required</strong>.
<mat-error *ngIf="valueFormControl.hasError('required') && mode !== 'update'">
A GeoName value is <strong>required</strong> {{mode}}.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required') && mode === 'update'">
Empty values are not supported when updating a value. Consider using the delete button instead.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('duplicateValue')">
<span class="custom-error-message"
Expand Down
Expand Up @@ -32,11 +32,16 @@
>New value must be an integer.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required')">
<mat-error *ngIf="valueFormControl.hasError('required') && mode !== 'update'">
<span class="custom-error-message"
>An integer value is <strong>required</strong>.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required') && mode === 'update'">
<span class="custom-error-message"
>Empty values are not supported when updating a value. Consider using the delete button instead.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('duplicateValue')">
<span class="custom-error-message"
>This value already exists for this property. Duplicate
Expand Down
Expand Up @@ -44,9 +44,12 @@
>New value must be different than the current value.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required')">
<mat-error *ngIf="valueFormControl.hasError('required') && mode !== 'update'">
A text value is <strong>required</strong>.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required') && mode === 'update'">
Empty values are not supported when updating a value. Consider using the delete button instead.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('duplicateValue')">
<span class="custom-error-message"
>This value already exists for this property. Duplicate
Expand Down
Expand Up @@ -41,9 +41,12 @@
>New value must be a valid URI.</span
>
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required')">
<mat-error *ngIf="valueFormControl.hasError('required') && mode !== 'update'">
A URI value is <strong>required</strong>.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('required') && mode === 'update'">
Empty values are not supported when updating a value. Consider using the delete button instead.
</mat-error>
<mat-error *ngIf="valueFormControl.hasError('duplicateValue')">
<span class="custom-error-message"
>This value already exists for this property. Duplicate
Expand Down

0 comments on commit c9e5d3f

Please sign in to comment.