ABS Material Basic Properties
ABS Material Basic Properties , ABS Material Basic Properties

There are a couple of common reasons why a “required” validator (or any validator) might not fire when you use a custom checkbox-group in Angular reactive forms:
- You are using a custom component (
checkbox-group
) that is not wired up as a real form control.- In Angular reactive forms, any custom form element (like a custom checkbox-group) must implement the
ControlValueAccessor
interface so Angular knows how to read from and write to it. Ifcheckbox-group
is just a regular component withoutControlValueAccessor
, Angular has no idea about its current value or whether it has been “touched,” “dirty,” etc. As a result, validators won’t trigger.
- In Angular reactive forms, any custom form element (like a custom checkbox-group) must implement the
store_ids
is set up as a string (''
) instead of an array (e.g.[]
)- From your code, it looks like
personaForm.controls.store_ids.value.includes(store.id)
is being used, implying thatstore_ids
should be an array of selected IDs. However, in your FormGroup initialization, you wrote:
- From your code, it looks like