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.



74
75
76
# File 'lib/active_model/validations/word_count.rb', line 74

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