I want a user to click a button to upload a document one at a time.
Currently, when a user uploads a document, it does mark the "documents" control as satisfied. However, if the user tries to upload another document but then CANCELS, it marks the control as unsatisfied. It still has the first document, but clicking cancel on the file explorer seems to make the validator think that no document was uploaded. How can I get around this?
in my html:
<input type="file" formControlName="documents" (change)="uploadDocument($event.target.files)">
in my .ts:
this.formGroupName=this.formBuilder.group({
documents: ['', Validators.compose([Validators.required])]
});
Right now my upoadDocument() function doesn't do anything with the validation.