Based on selection of file type conditional validation is applied
{{userinfoForm.controls?.fileType?.errors?.fileSize.message}}
{{userinfoForm.controls?.videoFile?.errors?.fileSize.message}}
{{userinfoForm.controls?.audioFile?.errors?.fileSize.message}}
If you want to apply conditional validation on 'Image File' then you need to add 'File Type' input as 'Picture'.
{{userinfoForm.controls?.imageFile?.errors?.fileSize.message}}
Uploaded File must be in the file size range.
It shows custom message
{{userinfoForm.controls?.contactFile?.errors?.fileSize.message}}
{{userinfoForm.controls?.profilePicture?.errors?.fileSize.message}}