Class: IpAddressValidator
- Inherits:
-
BaseValidator
- Object
- ActiveModel::EachValidator
- BaseValidator
- IpAddressValidator
- Defined in:
- lib/lite/validators/ip_address_validator.rb
Constant Summary collapse
- REGEXP =
{ ipv4: Resolv::IPv4::Regex, ipv6: Resolv::IPv6::Regex }.freeze
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
12 13 14 15 |
# File 'lib/lite/validators/ip_address_validator.rb', line 12 def validate_each(record, attribute, value) assert_valid_protocol! super end |