Module: ActiveModel::Validations::HelperMethods

Defined in:
lib/active_model/validations/word_count.rb

Instance Method Summary collapse

Instance Method Details

#validates_word_count(*attr_names) ⇒ Object

Lets you validate that given attributes have a word count within a specific range.



66
67
68
# File 'lib/active_model/validations/word_count.rb', line 66

def validates_word_count(*attr_names)
  validates_with WordCountValidator, _merge_attributes(attr_names)
end