Method: CarrierWave::Validations::ActiveModel::HelperMethods#validates_integrity_of
- Defined in:
- lib/carrierwave/validations/active_model.rb
#validates_integrity_of(*attr_names) ⇒ Object
Makes the record invalid if the file couldn’t be uploaded due to an integrity error
Accepts the usual parameters for validations in Rails (:if, :unless, etc…)
Note
Set this key in your translations file for I18n:
carrierwave:
errors:
integrity: 'Here be an error message'
47 48 49 |
# File 'lib/carrierwave/validations/active_model.rb', line 47 def validates_integrity_of(*attr_names) validates_with IntegrityValidator, _merge_attributes(attr_names) end |