You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
The FormFileModelBinder suppresses any further validation if a value is found. This can result in some confusion (example) because any validation attributes attached to a property that is an IFormFile or collection of IFormFiles will not be invoked if any files actually exist.
Is this suppression necessary?
The text was updated successfully, but these errors were encountered:
@rynowak Looks the suppression was deliberate. Do you remember why the suppression was added? Would it make sense to support [Required] on an IFormFile property?
Yeah, this was deliberate, and I think we just got this wrong. What we should be doing is setting ModelMetadata.ValidateChildren to false for this type, and but not suppressing validation of the node.
The FormFileModelBinder suppresses any further validation if a value is found. This can result in some confusion (example) because any validation attributes attached to a property that is an IFormFile or collection of IFormFiles will not be invoked if any files actually exist.
Is this suppression necessary?
The text was updated successfully, but these errors were encountered: