i have a parent form with all subforms that implements ControlValueAccessor
interface.
I need then to validate the emptiness of these forms from the parent. The logic of the isEmpty
changes in each form.
I tried to extend the interface ControlValueAccessor
with an isEmpty
method, but what i see from the parent form are only standard FormControl
childs without the isEmpty
method.
Is there a way to do this?
I mean that you need add as provider
And create a function validate
Inside the custom Form Control. Then the control is invalid according this function validate independently you create the formControl with validators or not