OSDN Git Service

t#31715:speech_balloon boost
[pettanr/pettanr.git] / lib / validators / extend_speech_validator.rb
1 class ExtendSpeechValidator < ActiveModel::EachValidator\r
2   def validate_each(record, attribute, value)\r
3     record.errors[attribute] << (options[:message] || I18n.t('activerecord.errors.messages.speech_extend')) unless record.extend_speech.valid?\r
4   end\r
5 end\r
6 \r