Class toolbox to validate values.
More...
Class toolbox to validate values.
Definition at line 28 of file validate.class.php.
| Validate::__construct |
( |
|
$db, |
|
|
|
$outputLang = null |
|
) |
| |
Use to clear errors msg or other ghost vars.
- Returns
- null
Definition at line 77 of file validate.class.php.
| Validate::isBool |
( |
|
$bool | ) |
|
Check for boolean validity.
- Parameters
-
| boolean | $bool | Boolean to validate |
- Returns
- boolean Validity is ok or not
Definition at line 252 of file validate.class.php.
| Validate::isDuration |
( |
|
$duration | ) |
|
Check Duration validity.
- Parameters
-
| mixed | $duration | to validate |
- Returns
- boolean Validity is ok or not
Definition at line 222 of file validate.class.php.
| Validate::isEmail |
( |
|
$email, |
|
|
|
$maxLength = false |
|
) |
| |
Check for e-mail validity.
- Parameters
-
| string | $email | e-mail address to validate |
| int | $maxLength | string max length |
- Returns
- boolean Validity is ok or not
Definition at line 100 of file validate.class.php.
| Validate::isInDb |
( |
|
$values, |
|
|
|
$table, |
|
|
|
$col |
|
) |
| |
Check for all values in db.
- Parameters
-
| array | $values | Boolean to validate |
| string | $table | the db table name without $this->db->prefix() |
| string | $col | the target col |
- Returns
- boolean Validity is ok or not
- Exceptions
-
Definition at line 270 of file validate.class.php.
References $resql, and db.
| Validate::isMaxLength |
( |
|
$string, |
|
|
|
$length |
|
) |
| |
Check for string max length validity.
- Parameters
-
| string | $string | to validate |
| int | $length | max length |
- Returns
- boolean Validity is ok or not
Definition at line 161 of file validate.class.php.
| Validate::isMinLength |
( |
|
$string, |
|
|
|
$length |
|
) |
| |
Check for string min length validity.
- Parameters
-
| string | $string | to validate |
| int | $length | max length |
- Returns
- boolean Validity is ok or not
Definition at line 192 of file validate.class.php.
| Validate::isNotEmptyString |
( |
|
$string | ) |
|
Check for string not empty.
- Parameters
-
- Returns
- boolean Validity is ok or not
Definition at line 176 of file validate.class.php.
| Validate::isNumeric |
( |
|
$string | ) |
|
Check numeric validity.
- Parameters
-
- Returns
- boolean Validity is ok or not
Definition at line 237 of file validate.class.php.
| Validate::isPhone |
( |
|
$phone | ) |
|
Check for phone validity.
- Parameters
-
| string | $phone | Phone string to validate |
- Returns
- boolean Validity is ok or not
Definition at line 145 of file validate.class.php.
| Validate::isPrice |
( |
|
$price | ) |
|
Check for price validity.
- Parameters
-
| string | $price | Price to validate |
- Returns
- boolean Validity is ok or not
Definition at line 115 of file validate.class.php.
| Validate::isTimestamp |
( |
|
$stamp | ) |
|
Check for timestamp validity.
- Parameters
-
| string | int | $stamp | timestamp to validate |
- Returns
- boolean Validity is ok or not
Definition at line 130 of file validate.class.php.
Check url validity.
- Parameters
-
- Returns
- boolean Validity is ok or not
Definition at line 207 of file validate.class.php.
| Validate::setError |
( |
|
$errMsg | ) |
|
|
protected |
Use to clear errors msg or other ghost vars.
- Parameters
-
| string | $errMsg | your error message |
- Returns
- null
Definition at line 88 of file validate.class.php.
The documentation for this class was generated from the following file: