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

Version Path
egov_utils-1.5.0.alpha15 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha14 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha13 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha12 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha11 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha10 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha9 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha8 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha7 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha6 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha5 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha4 app/validators/ico_validator.rb
egov_utils-1.4.5 app/validators/ico_validator.rb
egov_utils-1.4.4 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha3 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha2 app/validators/ico_validator.rb
egov_utils-1.5.0.alpha1 app/validators/ico_validator.rb
egov_utils-1.4.3 app/validators/ico_validator.rb
egov_utils-1.4.2 app/validators/ico_validator.rb
egov_utils-1.4.1 app/validators/ico_validator.rb