Validate |
[ class tree: Validate ] [ index: Validate ] [ all elements ] |
Packages: Validate Validate_[LocaleName] Classes: Files: |
[ Top ] $_gtld = array(
|
Type: | array |
[line 94]
International Top-Level DomainThis is an array of the known international top-level domain names.
Type: | array |
|
string | $date | — | Date to validate |
array | $options | — | array options where : 'format' The format of the date (%d-%m-%Y) or rfc822_compliant 'min' The date has to be greater than this array($day, $month, $year) or PEAR::Date object 'max' The date has to be smaller than this array($day, $month, $year) or PEAR::Date object |
|
string | — | email to validate | |
mixed | $options | — | boolean (BC) $check_domain Check or not if the domain exists array $options associative array of options 'check_domain' boolean Check or not if the domain exists 'use_rfc822' boolean Apply the full RFC822 grammar Ex. $options = array( 'check_domain' => 'true', 'fullTLDValidation' => 'true', 'use_rfc822' => 'true', 'VALIDATE_GTLD_EMAILS' => 'true', 'VALIDATE_CCTLD_EMAILS' => 'true', 'VALIDATE_ITLD_EMAILS' => 'true', ); |
|
This function will execute the full email vs tld validation using an array of tlds passed to it.
string | — | The email to validate. | |
array | $arrayOfTLDs | — | The array of the TLDs to validate |
|
Can be used on any of Validate subpackages
array | $data | — | Ex: array('name' => 'toto', 'email' => 'toto@thing.info'); |
array | $val_type | — | Contains the validation type and all parameters used in. 'val_type' is not optional others validations properties must have the same name as the function parameters. Ex: array('toto'=>array('type'=>'string','format'='toto@thing.info','min_length'=>5)); |
boolean | $remove | — | if set, the elements not listed in data will be removed |
&$data | — | ||
&$val_type | — |
|
string | $number | — | Number to validate |
array | $options | — | array where: 'decimal' is the decimal char or false when decimal not allowed. i.e. ',.' to allow both ',' and '.' 'dec_prec' Number of allowed decimals 'min' minimum value 'max' maximum value |
|
string | $string | — | String to validate |
array | $options | — | Options array where: 'format' is the format of the string Ex:VALIDATE_NUM . VALIDATE_ALPHA (see constants) 'min_length' minimum length 'max_length' maximum length |
|
This function will validate 'foobarstring' by default, to get it to validate only http, https, ftp and such you have to pass it in the allowed_schemes option, like this:
NOTE 1: The rfc2396 normally allows middle '-' in the top domain e.g. http://example.co-m should be valid However, as '-' is not used in any known TLD, it is invalid NOTE 2: As double shlashes // are allowed in the path part, only full URIs including an authority can be valid, no relative URIs the // are mandatory (optionally preceeded by the 'sheme:' ) NOTE 3: the full complience to rfc2396 is not achieved by default the characters ';/?:@$,' will not be accepted in the query part if not urlencoded, refer to the option "strict'"
string | $url | — | URI to validate |
array | $options | — | Options used by the validation method. key => type 'domain_check' => boolean Whether to check the DNS entry or not 'allowed_schemes' => array, list of protocols List of allowed schemes ('http', 'ssh+svn', 'mms') 'strict' => string the refused chars in query and fragment parts default: ';/?:@$,' empty: accept all rfc2396 foreseen chars |
|
string | $number | — | number to validate |
array | $weights | — | reference to array of weights |
int | $modulo | — | (optional) number |
int | $subtract | — | (optional) number |
&$weights | — |
|
This function is used to make a much more proficient validation against all types of official domain names.
string | — | The email address to check. | |
array | $options | — | The options for validation |
|
string | $number | — | number string |
array | $weights | — | reference to array of weights |
int | $modulo | — | (optionsl) number |
int | $subtract | — | (optional) number |
bool | $allow_high | — | (optional) true if function can return number higher than 10 |
&$weights | — |
|
string | $number | — | number string |
array | $weights | — | reference to array of weights |
&$weights | — |