Sha256: 0da47aab4ed1fe615713f7a00b762ffa676665611b4846dd0179e9b6d0c14738

Contents?: true

Size: 264 Bytes

Versions: 8

Compression:

Stored size: 264 Bytes

Contents

module ActiveModel
  module Validations
    class DomainNameValidator < ActiveModel::EachValidator
      def validate_each(record, attribute, value)
        record.errors.add(attribute) unless value.to_s =~ ::AbAdmin::DOMAINNAME_REGEXP
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ab_admin-0.11.0 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.10.0 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.9.0 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.8.3 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.8.2 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.8.1 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.8.0 lib/ab_admin/models/validations/domain_name_validator.rb
ab_admin-0.7.0 lib/ab_admin/models/validations/domain_name_validator.rb