This is not a supported extension point. So you are own if an upgrade breaks your validation.
Or you can file an improvement request in our Jira, but I can’t give any guarantees on whether it would be accepted or any timescale on when it would be implemented if it was.
It’s possible to extend the FileUploadField, and have this custom field use a custom model which can take care of the validation. If desired, the custom field could also use a custom FileuploadFieldPropertiesPanel.
public class MyFileUploadField extends FileUploadField {
@Override
public Class<? extends AbstractFieldModel> getModel() {
return MyFileuploadFieldModel.class;
}
@Override
public Class<? extends AbstractFieldPropertiesPanel> getPropertiesPanel() {
return MyFileuploadFieldPropertiesPanel.class;
}
}