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.
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!
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.
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.