igorkasyanchuk/active_storage_validations

Do it like => validates :photos, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 500.kilobytes }, limit: { min: 1, max: 3 }, aspect_ratio: :landscape, dimension: { width: { in: 800..1600 }

About the project

Active Storage Validations is a Ruby gem for adding validation rules to files attached through Rails Active Storage. Rails developers use it to check whether uploaded images, videos, audio files, PDFs, and other attachments meet requirements such as type, size, dimensions, duration, or quantity.

This repository also configures its own agents. See what active_storage_validations tells them →

1.2kStars on the repository
8Mods indexed here, across every type
2d agoLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

At most 3 mods per repository are shown here, and a mod shipped inside a plugin is left to that plugin's page — the rest are on their repository pages: