From 1ecb7cdd386326cbead39f43ada056782c99669e Mon Sep 17 00:00:00 2001 From: Gion-Andri Cantieni Date: Tue, 7 Nov 2023 14:42:00 +0100 Subject: [PATCH] fix: show correct error message if description is too long --- src/app/user-area/pages/new-event/new-event.component.html | 7 ++++++- src/app/user-area/pages/new-event/new-event.component.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/user-area/pages/new-event/new-event.component.html b/src/app/user-area/pages/new-event/new-event.component.html index 0cbacea..0fdc43c 100644 --- a/src/app/user-area/pages/new-event/new-event.component.html +++ b/src/app/user-area/pages/new-event/new-event.component.html @@ -27,7 +27,12 @@

Registrar in’occurrenza

- Endatescha p.pl. ina descripziun. + + Endatescha p.pl. ina descripziun. + + + La descripziun na dastga betg esser pli lunga che 750 caracters. +
Hilfe bei der Ăśbersetzung auf Rumantsch / Aiuto con la traduzione in diff --git a/src/app/user-area/pages/new-event/new-event.component.ts b/src/app/user-area/pages/new-event/new-event.component.ts index 19df687..62b16a6 100644 --- a/src/app/user-area/pages/new-event/new-event.component.ts +++ b/src/app/user-area/pages/new-event/new-event.component.ts @@ -126,6 +126,11 @@ export class NewEventComponent implements OnInit { return occurrence.get(fieldName)!.invalid && (occurrence.get(fieldName)!.dirty || occurrence.get(fieldName)!.touched); } + isFieldError(fieldName: string, errorName: string) { + const field = this.f.get(fieldName)!; + return field.hasError(errorName); + } + get genresFormArray(): FormArray { return this.f.get('genres') as FormArray; }