Sha256: 87f71f594b1e1c901f02c1e4d85c43b52b1b7bfb2b5a8e1ed2203472a37402e7
Contents?: true
Size: 229 Bytes
Versions: 1
Compression:
Stored size: 229 Bytes
Contents
# frozen_string_literal: true class IpValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors.add(attribute, :invalid, options) unless ValidatesHost::Ip.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/ip_validator.rb |