How to show validation on upload field?

0
Iโ€™ve got a dialog to create an object (inherits from System.Image), there is an Image Uploader in the dialog. I can detect if a (image) file has been selected for upload, but I canโ€™t show the validation message (coming from validation microflow) directly under the Upload field. How can I achieve that? My workaround is to also show the file size attribute and show the validation feedback on that field. But would be nicer to not need that extra field.
asked
4 answers
1

Hi Ben,

You could simply opt for a popup for this single field and be done with it. 

An alternative solution that I’ve used before is place a different attribute beneath it, hide this with styling (only the actual input field) and have the validation feedback be triggered on this attribute. It will look like regular validation feedback.

Good luck!

answered
0

Usually in the Attachment object there will be an inherited object attribute like HasContents , so you can do validation for this attribute in the corresponding save microflow. i.e, $Attachement/HasContents

Hope it will be helpful!

answered
0

At the point where you do the validation, store the validation to your session-data. When you need to show the validation message, get it from the session data. 

Check the Appstore app “RuleFeedback” for an example. 

answered
0

Extra styling it is… the size field is still there but hidden with styling (and empty label). Also added no bottom spacing on the Upload field.

answered