dolibarr 19.0.3
|
Class toolbox to validate values. More...
Public Member Functions | |
__construct ($db, $outputLang=null) | |
Constructor. | |
isEmail ($email, $maxLength=false) | |
Check for e-mail validity. | |
isPrice ($price) | |
Check for price validity. | |
isTimestamp ($stamp) | |
Check for timestamp validity. | |
isPhone ($phone) | |
Check for phone validity. | |
isMaxLength ($string, $length) | |
Check for string max length validity. | |
isNotEmptyString ($string) | |
Check for string not empty. | |
isMinLength ($string, $length) | |
Check for string min length validity. | |
isUrl ($url) | |
Check url validity. | |
isDuration ($duration) | |
Check Duration validity. | |
isNumeric ($string) | |
Check numeric validity. | |
isBool ($bool) | |
Check for boolean validity. | |
isInDb ($values, $table, $col) | |
Check for all values in db. | |
isFetchableElement ($id, $element_type) | |
Check for all values in db for an element. | |
Protected Member Functions | |
clear () | |
Use to clear errors msg or other ghost vars. | |
setError ($errMsg) | |
Use to clear errors msg or other ghost vars. | |
Class toolbox to validate values.
Definition at line 28 of file validate.class.php.
Validate::__construct | ( | $db, | |
$outputLang = null ) |
Constructor.
Definition at line 53 of file validate.class.php.
|
protected |
Use to clear errors msg or other ghost vars.
Definition at line 77 of file validate.class.php.
Validate::isBool | ( | $bool | ) |
Check for boolean validity.
boolean | $bool | Boolean to validate |
Definition at line 252 of file validate.class.php.
Validate::isDuration | ( | $duration | ) |
Check Duration validity.
mixed | $duration | to validate |
Definition at line 222 of file validate.class.php.
Validate::isEmail | ( | $email, | |
$maxLength = false ) |
Check for e-mail validity.
string | e-mail address to validate | |
int | $maxLength | string max length |
Definition at line 100 of file validate.class.php.
Validate::isFetchableElement | ( | $id, | |
$element_type ) |
Check for all values in db for an element.
integer | $id | of element |
string | $element_type | the element type |
Exception |
Definition at line 348 of file validate.class.php.
References getElementProperties().
Validate::isInDb | ( | $values, | |
$table, | |||
$col ) |
Check for all values in db.
array | $values | Boolean to validate |
string | $table | the db table name without $this->db->prefix() |
string | $col | the target col |
Exception |
Definition at line 270 of file validate.class.php.
Validate::isMaxLength | ( | $string, | |
$length ) |
Check for string max length validity.
string | $string | to validate |
int | $length | max length |
Definition at line 161 of file validate.class.php.
Validate::isMinLength | ( | $string, | |
$length ) |
Check for string min length validity.
string | $string | to validate |
int | $length | max length |
Definition at line 192 of file validate.class.php.
Validate::isNotEmptyString | ( | $string | ) |
Check for string not empty.
string | $string | to validate |
Definition at line 176 of file validate.class.php.
Validate::isNumeric | ( | $string | ) |
Check numeric validity.
mixed | $string | to validate |
Definition at line 237 of file validate.class.php.
Validate::isPhone | ( | $phone | ) |
Check for phone validity.
string | $phone | Phone string to validate |
Definition at line 145 of file validate.class.php.
Validate::isPrice | ( | $price | ) |
Check for price validity.
string | $price | Price to validate |
Definition at line 115 of file validate.class.php.
Validate::isTimestamp | ( | $stamp | ) |
Check for timestamp validity.
string | int | $stamp | timestamp to validate |
Definition at line 130 of file validate.class.php.
Validate::isUrl | ( | $url | ) |
Check url validity.
string | $url | to validate |
Definition at line 207 of file validate.class.php.
|
protected |
Use to clear errors msg or other ghost vars.
string | $errMsg | your error message |
Definition at line 88 of file validate.class.php.