Having a strange issue with validating my customized template-driven form control. I'm struggling to make the "required" validator work as expected, even after spending hours trying different solutions.
The control in question is essentially a wrapper for a 3rd party autocomplete component. I am aiming to make this entire component mandatory, meaning that its value must be defined and not null. However, simply adding the required directive like this...
<my-control ... required></my-control>
results in the required validator only checking the content of a text-input within the nested autocomplete control. Although binding the value (ngModel) of my control displays the correct value, it seems that the validator does not recognize it.
I also attempted to create a custom validator, but encountered the same issue. Even when monitoring the value property of the FormControl passed to the validator, I could only see the value entered into the text-input located deep within the nesting structure.