Sha256: f357c8baf34f45869ac2f1948236cba949c297d07f621568425a64cc774a14b6
Contents?: true
Size: 400 Bytes
Versions: 6
Compression:
Stored size: 400 Bytes
Contents
module C80Features class ParaValidator < ActiveModel::Validator def validate(record) puts "<ParaValidator.validate> record = #{record}" # unless record.title.present? # record.errors[:title] = 'Укажите заголовок' # end unless record.content.present? record.errors[:content] = 'Заполните текст' end end end end
Version data entries
6 entries across 6 versions & 1 rubygems