Lightweight custom validation attributes for .NET projects.
dotnet add package Zed.Validation.Attributespublic class UploadFileDto
{
[AllowedExtensions([".jpg", ".png"], ErrorMessage = "Only JPG or PNG files are allowed.")]
[MaxFileSize(5 * 1024 * 1024, ErrorMessage = "File size must not exceed 5MB.")]
public IFormFile File { get; set; }
}AllowedExtensions– Restricts uploaded file types based on extensionsMaxFileSize– Limits the maximum size of uploaded files