I'm using <lightning:input ... type="file">
to allow file upload on the UI. Is there any way I could make it optional in the component itself? instead of taking care of the check completely in the controller.
1 Answer
lightning:input type="file"
is optional by default. You would need to set the required
attribute to true in order for the file upload to be required.
If you want the file upload to be required under certain circumstances there are some things you could do within your Aura component to make that happen but without knowing your requirements I can only speculate on them here.