validates_serialized icon indicating copy to clipboard operation
validates_serialized copied to clipboard

Validation helpers for serialized ActiveModel attributes

Results 5 validates_serialized issues
Sort by recently updated
recently updated
newest added

I encountered a situation where I needed to give a validation on a serialized Hash access to the outer, "real" object - for instance, validations conditional on some state of...

Previous to this commit the following would fail silently: ``` validates_hash_keys :hash do validates :key, presence: true, if: :if_method end def if_method false end ``` This PR allows us to...

Is it possible to use a [conditional validation](http://edgeguides.rubyonrails.org/active_record_validations.html#conditional-validation) with validates_serialized gem ? If not, I am able to contribute with it.

the method in [validating-a-serialized-array-syntax-1](https://github.com/brycesenz/validates_serialized#validating-a-serialized-array-syntax-1) should be `validates_array_values`

If I have a nested validation: ``` serialize :data, Hash validates_hash_keys :data do validates :url, presence: true, if: Proc.new{|f| f.required_data_field?(:url) } end ``` The f in the Proc won't be...