Sha256: a98a2ebba0011e7bbbdbb9f2988685bb6d8ce2b6f751c3491a131ddfa17ec895
Contents?: true
Size: 205 Bytes
Versions: 2
Compression:
Stored size: 205 Bytes
Contents
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
validates_host-1.1.0 | lib/validates_host/subnet_validator.rb |
validates_host-1.0.0 | lib/validates_host/subnet_validator.rb |