I have created a custom File-Upload
control in angular material. It's working as it should except for one case. I am unable to tell the calling FormGroup
about the nature of the validation error whenever one occurs.
For example, When the size of the selected file is more than allowed or the type of file selected is not acceptable.
For any of the validation errors, there is only one boolean errorState
field which is letting the FormGroup know that there is an error.
How do I tell the form group about this nature of the error so that it can show an appropriate message to the user?
I have posted the code at this StackBlitz