From 027d4eeeab00c18b1e5e736535447323883ef89c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 23 Sep 2024 14:43:22 +0300 Subject: [PATCH] UI: Refactoring for required --- .../src/app/shared/components/entity/entity-list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-list.component.ts b/ui-ngx/src/app/shared/components/entity/entity-list.component.ts index a9aae0c9ce..cfb0f19b1b 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-list.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-list.component.ts @@ -210,7 +210,7 @@ export class EntityListComponent implements ControlValueAccessor, OnInit, AfterV } validate(): ValidationErrors | null { - return isArray(this.modelValue) && this.modelValue.length ? null : { + return (isArray(this.modelValue) && this.modelValue.length) || !this.required ? null : { entities: {valid: false} }; }