Class: I2CE Validate (Development)

From IHRIS Wiki


This article describes the class I2CE_Validate .

Variables

$false

$true

$BaseChar

$Ideographic

$Letter

$Digit

$CombiningChar

$Extender

$NameChar

$Name

$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.

checkDate()

Checks to make sure a date is valid

checkEmail()

checkMap()

Checks to make sure a mapped value is valid. Map values are saved as an array( "form", "id" );

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.

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:
    • string $string
    • boolean $asBool
      Defaults to false. If true returns true/false otherwise returns 1/0. I know ... this is confusing.
      • Default Value: false
  • Returns: mixed
    string or null if it is not recognized

isNmToken()

isTokenDigit()

isTokenLetter()

isTokenName()

setupTokenRegexps()

stripCurrency()

Remove any invalid characters that can't be part of a valid currency value.