Class Ip
Responsibility: Validate if a submitted value is an IP address. It supports the IPv4, IPv6 and IPvFeature definitions.
- MvcCore\Ext\Forms\Validator implements MvcCore\Ext\Forms\IValidator
-
MvcCore\Ext\Forms\Validators\Ip
Located at ext-form-validator-special/src/MvcCore/Ext/Forms/Validators/Ip.php
public
boolean
|
#
GetAllowIPv4OctetFormat( )
Get |
public
|
#
SetAllowIPv4OctetFormat( boolean $allowIPv4OctetFormat = TRUE )
Set |
public
boolean
|
#
GetAllowIPv4HexFormat( )
Get |
public
|
#
SetAllowIPv4HexFormat( boolean $allowIPv4HexFormat = TRUE )
Set |
public
boolean
|
#
GetAllowIPv4BinaryFormat( )
Get |
public
|
#
SetAllowIPv4BinaryFormat( boolean $allowIPv4BinaryFormat = TRUE )
Set |
public
boolean
|
|
public
|
#
SetAllowIPv6( boolean $allowIPv6 = TRUE )
Set |
public
boolean
|
|
public
|
#
SetAllowIPv6Literals( boolean $allowIPv6Literals = TRUE )
Set |
public
string|null
|
|
protected
string|null
|
|
protected
string|null
|
CreateInstance(),
GetErrorMessage(),
SetField(),
SetForm(),
__construct(),
setUpFieldProps(),
throwNewInvalidArgumentException()
|
integer |
ERROR_IP
Error message index(es). |
#
0
|
protected static
array
|
$errorMessages
Validation failure message template definitions. |
#
[
self::ERROR_IP => "Field '{0}' requires a valid IP address. Allowed types: {1}.",
]
|
protected
boolean
|
$allowIPv4OctetFormat
Allow IPv4 validation in octet format.
Default value is |
#
TRUE
|
protected
boolean
|
$allowIPv4HexFormat
Allow IPv4 validation in hexadecimal format.
Default value is |
#
FALSE
|
protected
boolean
|
$allowIPv4BinaryFormat
Allow IPv4 validation in binary format.
Default value is |
#
FALSE
|
protected
boolean
|
$allowIPv6
Allow IPv6 validation.
Default value is |
#
TRUE
|
protected
mixed
|
$allowIPv6Literals
Allow IPV6 literals.
Default value is |
#
FALSE
|
$field,
$fieldSpecificProperties,
$form,
$toolClass
|