Sha256: 30040defeb819a9fdc78c11a778aff7b78d802b85eda362f3fe4c2bdb407d70a
Contents?: true
Size: 245 Bytes
Versions: 1
Compression:
Stored size: 245 Bytes
Contents
# frozen_string_literal: true 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
validates_host-1.2.0 | lib/validates_host/domain_name_validator.rb |