Sha256: c22f13f95451d9581d204dc4a1c82a26f6131796969864ce6d4bc5e264b4ea9d
Contents?: true
Size: 586 Bytes
Versions: 4
Compression:
Stored size: 586 Bytes
Contents
class BaseTestIpAddress include ActiveModel::Validations attr_accessor :ip end class TestIpAddress < BaseTestIpAddress validates :ip, :ip_address => true end class TestIpAddressWithPrefix < BaseTestIpAddress validates :ip, :ip_address => { :allow_prefix => true } end class TestIpAddress4 < BaseTestIpAddress validates :ip, :ip_address => { :only => :ipv4 } end class TestIpAddress6 < BaseTestIpAddress validates :ip, :ip_address => { :only => :ipv6 } end class TestIpAddressWithMessage < BaseTestIpAddress validates :ip, :ip_address => { :message => "invalid" } end
Version data entries
4 entries across 4 versions & 1 rubygems