Sha256: 899f733d9841f8c5dbfc1dabc652a73c6b1d042af23152d6ec95c88fb4eccad1

Contents?: true

Size: 250 Bytes

Versions: 3

Compression:

Stored size: 250 Bytes

Contents

module C80NewsTz
  class CommentValidator < ActiveModel::Validator
    def validate(record)
      unless record.message.present?
        record.errors[:message] = 'Сообщение не может быть пустым.'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
c80_news_tz-0.1.1.26 app/models/c80_news_tz/comment_validator.rb
c80_news_tz-0.1.1.25 app/models/c80_news_tz/comment_validator.rb
c80_news_tz-0.1.1.24 app/models/c80_news_tz/comment_validator.rb