Class: I2CE Validate (Development)
This article describes the class I2CE_Validate .
- Location: Part of the module I2CE in the package I2CE 4.1-dev
- Source: Defined in the file lib/I2CE_Validate.php on line 34
Variables
$false
- Defined in i2ce/lib/I2CE_Validate.php on line 153
- Type: static protected $false
$true
- Defined in i2ce/lib/I2CE_Validate.php on line 154
- Type: static protected $true
$BaseChar
- Defined in i2ce/lib/I2CE_Validate.php on line 281
- Type: static protected $BaseChar
$Ideographic
- Defined in i2ce/lib/I2CE_Validate.php on line 282
- Type: static protected $Ideographic
$Letter
- Defined in i2ce/lib/I2CE_Validate.php on line 283
- Type: static protected $Letter
$Digit
- Defined in i2ce/lib/I2CE_Validate.php on line 284
- Type: static protected $Digit
$CombiningChar
- Defined in i2ce/lib/I2CE_Validate.php on line 285
- Type: static protected $CombiningChar
$Extender
- Defined in i2ce/lib/I2CE_Validate.php on line 286
- Type: static protected $Extender
$NameChar
- Defined in i2ce/lib/I2CE_Validate.php on line 287
- Type: static protected $NameChar
$Name
- Defined in i2ce/lib/I2CE_Validate.php on line 288
- Type: static protected $Name
$tokenRegexps
- Defined in i2ce/lib/I2CE_Validate.php on line 289
- Type: static protected $tokenRegexps
Methods
checkCurrency()
Checks to make sure currency is valid. This method checks to make sure a number is valid for currency. It can have a decimal or comma with 2 digits past.
- Defined in i2ce/lib/I2CE_Validate.php on line 98
- Signature: static public function checkCurrency($data)
- Parameters:
- number $data
- Returns: boolean
checkDate()
Checks to make sure a date is valid
- Defined in i2ce/lib/I2CE_Validate.php on line 146
- Signature: static public function checkDate($data)
- Parameters:
- I2CE_Date $data
- Returns: boolean
checkEmail()
- Defined in i2ce/lib/I2CE_Validate.php on line 109
- Signature: static public function checkEmail($email)
- Parameters:
checkMap()
Checks to make sure a mapped value is valid. Map values are saved as an array( "form", "id" );
- Defined in i2ce/lib/I2CE_Validate.php on line 81
- Signature: static public function checkMap($data)
- Parameters:
- array $data
- Returns: boolean
checkNumber()
Checks to make sure a number is valid This method checks to make sure the number is a number and optionally that it is greater than a specific value.
- Defined in i2ce/lib/I2CE_Validate.php on line 59
- Signature: static public function checkNumber($data,$min_value)
- Parameters:
- number $data
- number $min_value
- Default Value: false
- Returns: boolean
checkPassword()
- Defined in i2ce/lib/I2CE_Validate.php on line 124
- Signature: static public function checkPassword($password)
- Parameters:
- $password
checkString()
Checks to make sure a string isn't blank.
- Defined in i2ce/lib/I2CE_Validate.php on line 41
- Signature: static public function checkString($data)
- Parameters:
- string $data
- Returns: boolean
checkVersion()
Checks to see if the versions meet the demans given by the operator. Opeartors are '<','lessthan','>','greaterthan','=','equal','equals','exactly','<=','atmost','>=','atleast'
- Defined in i2ce/lib/I2CE_Validate.php on line 195
- Signature: static public function checkVersion($vers1,$operator,$vers2)
- Parameters:
- $vers1
- $operator
- $vers2
- Returns: true
on sucess. false on failure
convertToBoolean()
Converts a string such as true/false/yes/no/1/0 to boolean value (stored as either the string '0' or '1')
- Defined in i2ce/lib/I2CE_Validate.php on line 161
- Signature: static public function convertToBoolean($string,$asBool)
- Parameters:
- Returns: mixed
string or null if it is not recognized
isNmToken()
- Defined in i2ce/lib/I2CE_Validate.php on line 316
- Signature: static public function isNmToken($val)
- Parameters:
- $val
isTokenDigit()
- Defined in i2ce/lib/I2CE_Validate.php on line 300
- Signature: static public function isTokenDigit($val)
- Parameters:
- $val
isTokenLetter()
- Defined in i2ce/lib/I2CE_Validate.php on line 306
- Signature: static public function isTokenLetter($val)
- Parameters:
- $val
isTokenName()
- Defined in i2ce/lib/I2CE_Validate.php on line 311
- Signature: static public function isTokenName($val)
- Parameters:
- $val
setupTokenRegexps()
- Defined in i2ce/lib/I2CE_Validate.php on line 290
- Signature: protected function setupTokenRegexps()
stripCurrency()
Remove any invalid characters that can't be part of a valid currency value.
- Defined in i2ce/lib/I2CE_Validate.php on line 119
- Signature: static public function stripCurrency($data)
- Parameters:
- string $data
- Returns: number