Sha256: 6cb575af96815813640f1e26c21b6d1fc781ffde5fc518d78d86a5e85d7a68b1
Contents?: true
Size: 359 Bytes
Versions: 59
Compression:
Stored size: 359 Bytes
Contents
module Xeroizer module Record class Validator class PresenceOfValidator < Validator def valid?(record) if record[attribute].nil? || record[attribute].to_s == '' record.errors << [attribute, options[:message] || "can't be blank"] end end end end end end
Version data entries
59 entries across 59 versions & 3 rubygems