Sha256: d6017ff795862397064edfe65301c316c689c213a23a70ed612342d2fb01a10c
Contents?: true
Size: 217 Bytes
Versions: 2
Compression:
Stored size: 217 Bytes
Contents
class LowercaseValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors.add attribute, (options[:message] || "must be lowercase") unless value == value.downcase end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.2.0 | stubs/default/app/validators/lowercase_validator.rb |
kaze-0.1.0 | stubs/default/app/validators/lowercase_validator.rb |