enum Athena::Validator::Constraints::IP::Version

Overview

Determines how the IP address should be validated.

Defined in:

constraints/ip.cr

Enum Members

V4 = 0

Validates for IPv4 addresses.

V6 = 1

Validates for IPv6 addresses.

V4_V6 = 2

Validates for IPv4 or IPv6 addresses.

Instance Method Summary

Instance Method Detail

def pattern : ::Regex #

Returns the ::Regex pattern for self.


[View source]
def v4? #

[View source]
def v4_v6? #

[View source]
def v6? #

[View source]