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 }
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.
Latest release 4.1.0 · 19 Aug 2026
These files are igorkasyanchuk/active_storage_validations's own configuration. They tell Codex, OpenCode, Claude Code and Cursor how to work on this repository, so they are not mods to install elsewhere. Copy one as a starting point and replace the parts that are about this project.
AGENTS.md A 4,541 tok .cursor/skills/commit/SKILL.md A 35 tok