Basic IFormFile model validation attributes
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
_No response_
### Describe the solution you'd like
It would be nice to have a model validation attribute like `MaxFileSizeAttribute` on `IFormFile` fields to validate the file size.
It might also be nice to have a `FileExtensionsAttribute` (like the one in System.ComponentModel.DataAnnotations) that works on IFormFile types by looking at the file name. Although this would not suffice as proper validation, it could serve as basic validation before checking the actual file content.
### Additional context
Related to #8573
Contributor guide
Assessment
This issue has not been assessed yet.