active_storage_validations icon indicating copy to clipboard operation
active_storage_validations copied to clipboard

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, dimens...

Results 49 active_storage_validations issues
Sort by recently updated
recently updated
newest added

We don't need to specify either allowing and rejecting. Fix #127

I have the following validation in my model: ```ruby validates :input_image, attached: true, content_type: ["image/png", "image/jpeg"], dimension: { width: { min: 10, max: 5000 }, height: { min: 10, max:...

Couldn't get around this: `DEPRECATION WARNING: image/bmp is not a valid content type, it should not be used when creating a blob, and support for it will be removed in...

I use the following to allow attaching of remote files: ```ruby module ActiveStorage module RemoteURLHelper # If the record is persisted and unchanged, the attachments are saved to # the...

bug
help wanted

Hello, in `DimensionValidator` is there a reason to validate image dimensions only when uploading attachment and not all the time ? https://github.com/igorkasyanchuk/active_storage_validations/blob/b970f959dd3476f2a591ea35ddc8cd6b9b61305b/lib/active_storage_validations/dimension_validator.rb#L41-L53 Example: ```ruby user.avatar.attach(...) # image with wrong dimensions...

bug

Hi, I would like to propose a new validation that checks if the extension matches the actual content type of the document. This should help to prevent upload of a...

enhancement

Some validators do not have their matcher, it should be implemented. List of missing matchers: - limit - processable_image

enhancement
good first issue

Like content_type, we should be able to support multiple aspect ratios. Possible to get inspiration from this fork: https://github.com/igorkasyanchuk/active_storage_validations/compare/master...nejdetkadir:active_storage_validations:master. But not too much because they modified the :with option, we...

enhancement
good first issue

I get `Skipping image analysis because ImageMagick or Vips doesn't support the file`, and the `Meta` class used for validation just seems to support images, not video. Or am I...

enhancement
help wanted

Hi, I've noticed that `processable_image` validation works kind of strange. It's possible to create any invalid image file (like create .txt file and then change extension to .png) and upload...

bug