Sha256: a09de48815f5ae9d4d4f528a12015c8de6f8cf11c5d9ef9dd0bd9cfc850b9cfe

Contents?: true

Size: 213 Bytes

Versions: 2

Compression:

Stored size: 213 Bytes

Contents

class DomainNameValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    record.errors.add(attribute, :invalid, options) unless ValidatesHost::DomainName.new(value).valid?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
validates_host-1.1.0 lib/validates_host/domain_name_validator.rb
validates_host-1.0.0 lib/validates_host/domain_name_validator.rb