1 class QuotesEvenValidator < ActiveModel::EachValidator
\r
2 def validate_each(record, attribute, value)
\r
3 record.errors[attribute] << (options[:message] || I18n.t('activerecord.errors.messages.quotes_even')) if value.to_s.split(/ /).size.odd?
\r