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

Hi! I am having a problem with the dimension validator where [this line](https://github.com/igorkasyanchuk/active_storage_validations/blob/47f676ff16eded49226c5df9a02e6e312a5cbb25/lib/active_storage_validations/metadata.rb#L24) causes the exception `NoMethodError (undefined method `id' for nil:NilClass)`. Any idea of how to fix? Thanks! ps....

help wanted

This Gem is great. i'm using it for a front end form which is perfect. I'm also using it for the Admin part of my App using activeadmin gem. I...

help wanted

Hey, thanks for your work on the gem! Consider the following example code: ``` # In model.rb has_one_attached :image accepts_nested_attributes_for :image_attachment, allow_destroy: true validates :image, presence: true ``` If the...

help wanted

Hi :) great work on the gem! I have a validation that I only want to run on update. The validation does run on update as I expect, however the...

help wanted

help wanted

Using: ```ruby validates :attachments, size: { less_than: 200.kilobytes } ``` The message I get is > Attachments size 1.5 MB is not between required range - This is broken English...

help wanted

I ran into an issue when using active_storage_validations with Trestle (https://github.com/TrestleAdmin/trestle/trestle-active_storage) and with trestle-active_storage (https://github.com/richardvenneman/trestle-active_storage, wrote about the issue here: https://github.com/richardvenneman/trestle-active_storage/issues/23) and I'm not sure which of the gems possibly...

help wanted

I have the following model: ```ruby class Payment < ApplicationRecord validates :voucher, attached: true, if: :paid? end ``` And the following test: ```ruby context 'when is paid' do subject {...

help wanted

``` en: errors: messages: content_type_invalid: "has an invalid content type" ... ``` does not work. but if I put messages under activerecord errors, it works.

help wanted

When using direct uploads, ActiveStorage will delay identifying the file into a background job, spawned only after the file has been attached. Currently, the initial blob's `content_type` is determined solely...

help wanted