From 0c1d973ec1ed0b4eab70912bcf945a17ca713685 Mon Sep 17 00:00:00 2001 From: Piotr Belke Date: Fri, 15 Nov 2024 17:08:52 +0100 Subject: [PATCH] IKC-427 Create cluster validation --- .../feat-clusters/src/lib/cluster-form/cluster-form-util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-util.ts b/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-util.ts index 66943f86..e3d8983c 100644 --- a/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-util.ts +++ b/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-util.ts @@ -25,7 +25,7 @@ export class ClusterFormUtil { public static noWhitespaces(): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { - return control.value?.length === 0 || (control.value || '').trim().length ? null : {incorrectValue: true}; + return control.value === null || control.value?.length === 0 || (control.value || '').trim().length ? null : {incorrectValue: true}; }; } }