Method: CarrierWave::Validations::ActiveModel::HelperMethods#validates_processing_of
- Defined in:
- lib/carrierwave/validations/active_model.rb
#validates_processing_of(*attr_names) ⇒ Object
Makes the record invalid if the file couldn’t be processed (assuming the process failed with a CarrierWave::ProcessingError)
Accepts the usual parameters for validations in Rails (:if, :unless, etc…)
Note
Set this key in your translations file for I18n:
carrierwave:
errors:
processing: 'Here be an error message'
65 66 67 |
# File 'lib/carrierwave/validations/active_model.rb', line 65 def validates_processing_of(*attr_names) validates_with ProcessingValidator, _merge_attributes(attr_names) end |