Sha256: 454e703becd3b79e5935958343c2ed19486c0aa7eb25ab2cb03c526aa3aac6ab
Contents?: true
Size: 287 Bytes
Versions: 6
Compression:
Stored size: 287 Bytes
Contents
module ActiveModel module Validations class BlankValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless value.blank? record.errors.add attribute, options[:message] || :must_be_blank end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems