Sha256: 678defb79d0d0998cf6a447e69e26cedc9265aa2c91490131344b5c5b36710f8
Contents?: true
Size: 232 Bytes
Versions: 119
Compression:
Stored size: 232 Bytes
Contents
class IcoValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless !value.nil? && value =~ /\A\d{7,9}\z/ record.errors.add(attribute, (options[:message] || :ico_format)) end end end
Version data entries
119 entries across 119 versions & 1 rubygems