Browse Source

UI: Refactoring for required

pull/11678/head
Artem Dzhereleiko 2 years ago
parent
commit
027d4eeeab
  1. 2
      ui-ngx/src/app/shared/components/entity/entity-list.component.ts

2
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}
};
}

Loading…
Cancel
Save