Class Url
Responsibility: Validate URI string by PHP: filter_var($rawSubmittedValue, FILTER_VALIDATE_URL); THIS VALIDATOR DOESN'T MEAN SAFE VALUE TO PREVENT SQL INJECTS! To prevent sql injects - use
\PDO::prepare();and
\PDO::execute()`.
- MvcCore\Ext\Forms\Validator implements MvcCore\Ext\Forms\IValidator
-
MvcCore\Ext\Forms\Validators\Url
Namespace: MvcCore\Ext\Forms\Validators
Copyright: Copyright (c) 2016 Tom Flidr (https://github.com/mvccore)
License: https://mvccore.github.io/docs/mvccore/5.0.0/LICENCE.md
Located at ext-form-field-text/src/MvcCore/Ext/Forms/Validators/Url.php
Copyright: Copyright (c) 2016 Tom Flidr (https://github.com/mvccore)
License: https://mvccore.github.io/docs/mvccore/5.0.0/LICENCE.md
Located at ext-form-field-text/src/MvcCore/Ext/Forms/Validators/Url.php
public
string[]
|
#
GetAllowedSchemes( )
Returns the allowed absolute url schemes,
|
public
|
#
SetAllowedSchemes( string[] $allowedSchemes )
Sets the allowed absolute url schemes,
|
public
string|boolean
|
|
public
|
#
SetDnsValidation( string|boolean $dnsValidation = self::VALIDATE_DNS_TYPE_A )
Sets the DNS validation option. |
public
string|null
|
CreateInstance(),
GetErrorMessage(),
SetField(),
SetForm(),
__construct(),
setUpFieldProps(),
throwNewInvalidArgumentException()
|
boolean |
VALIDATE_DNS_TYPE_NONE
|
#
FALSE
|
string |
VALIDATE_DNS_TYPE_ANY
|
#
'ANY'
|
string |
VALIDATE_DNS_TYPE_A
|
#
'A'
|
string |
VALIDATE_DNS_TYPE_A6
|
#
'A6'
|
string |
VALIDATE_DNS_TYPE_AAAA
|
#
'AAAA'
|
string |
VALIDATE_DNS_TYPE_CNAME
|
#
'CNAME'
|
string |
VALIDATE_DNS_TYPE_MX
|
#
'MX'
|
string |
VALIDATE_DNS_TYPE_NAPTR
|
#
'NAPTR'
|
string |
VALIDATE_DNS_TYPE_NS
|
#
'NS'
|
string |
VALIDATE_DNS_TYPE_PTR
|
#
'PTR'
|
string |
VALIDATE_DNS_TYPE_SOA
|
#
'SOA'
|
string |
VALIDATE_DNS_TYPE_SRV
|
#
'SRV'
|
string |
VALIDATE_DNS_TYPE_TXT
|
#
'TXT'
|
integer |
ERROR_URL
Error message index(es). |
#
0
|
integer |
ERROR_DNS
|
#
1
|
protected static
string[]
|
$allDnsValidations
All DNS validation types. |
#
[
self::VALIDATE_DNS_TYPE_ANY,
self::VALIDATE_DNS_TYPE_A,
self::VALIDATE_DNS_TYPE_A6,
self::VALIDATE_DNS_TYPE_AAAA,
self::VALIDATE_DNS_TYPE_CNAME,
self::VALIDATE_DNS_TYPE_MX,
self::VALIDATE_DNS_TYPE_NAPTR,
self::VALIDATE_DNS_TYPE_NS,
self::VALIDATE_DNS_TYPE_PTR,
self::VALIDATE_DNS_TYPE_SOA,
self::VALIDATE_DNS_TYPE_SRV,
self::VALIDATE_DNS_TYPE_TXT,
]
|
protected static
array
|
$errorMessages
Validation failure message template definitions. |
#
[
self::ERROR_URL => "Field '{0}' requires a valid URL.",
self::ERROR_DNS => "The host in field '{0}' could not be resolved.",
]
|
protected
string|boolean
|
$dnsValidation
DNS optional validation. |
#
self::VALIDATE_DNS_TYPE_NONE
|
protected
string[]
|
$allowedSchemes
Allowed URL schemes, |
#
['http', 'https', 'ftp', 'ftps',]
|
$field,
$fieldSpecificProperties,
$form,
$toolClass
|