Sha256: 9526c0a6fb7fd2a104e422c33bf8437c04227c8a00b271eaaba7ca525b1b5083
Contents?: true
Size: 237 Bytes
Versions: 1
Compression:
Stored size: 237 Bytes
Contents
# frozen_string_literal: true class SubnetValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors.add(attribute, :invalid, options) unless ValidatesHost::Subnet.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/subnet_validator.rb |