AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Statics
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • Form

Class Form

Form validator

Namespace:Alo\Validators
Package:Validators
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/validators/form.php

Methods summary

public
#__construct(array$input)

Instantiates the class and loads the input array

Instantiates the class and loads the input array

Parameters

$input
array
$input The input array

Author

Art <a.molcanovas@gmail.com>
publicAlo\Validators\Form
#evaluate( )

Evaluates the data

Evaluates the data

Returns

Alo\Validators\Form

Author

Art <a.molcanovas@gmail.com>
protected static boolean
#evalParam(string$dataValue,integer$bindKey,mixed$bindValue)

Evaluates an element against a requirement

Evaluates an element against a requirement

Parameters

$dataValue
string
$dataValue Element value
$bindKey
integer
$bindKey The requirement identifier constant
$bindValue
mixed
$bindValue The requirement specs if applicable

Returns

boolean

Author

Art <a.molcanovas@gmail.com>
publicAlo\Validators\Form
#bind(string$element,array$requirements)

Binds a set of requirements to an element

Binds a set of requirements to an element

Parameters

$element
string
$element The element key
$requirements
array
$requirements Associative array of requirements, where the keys are one of this class' R_* constants and the values are TRUE, or, if applicable, the required values for that test.

Returns

Alo\Validators\Form

Author

Art <a.molcanovas@gmail.com>
public array
#getEvaluation( )

Returns the evaluation array

Returns the evaluation array

Returns

array

Author

Art <a.molcanovas@gmail.com>
public array
#getBinds( )

Returns the binds set

Returns the binds set

Returns

array

Author

Art <a.molcanovas@gmail.com>

Magic methods summary

Constants summary

integerR_EMAIL101
#

Defines a requirement as "email format"

Defines a requirement as "email format"

integerR_REQUIRED102
#

Defines a requirement as "value required"

Defines a requirement as "value required"

integerR_NUMERIC103
#

Defines a requirement as "must be numeric"

Defines a requirement as "must be numeric"

integerR_LENGTH_MIN104
#

Defines a requirement as "minimum length"

Defines a requirement as "minimum length"

integerR_LENGTH_MAX105
#

Defines a requirement as "maximum length"

Defines a requirement as "maximum length"

integerR_REGEX106
#

Defines a requirement as "must match regular expression"

Defines a requirement as "must match regular expression"

integerR_CONTAIN_UPPERCASE107
#

Defines a requirement as "must contain uppercase character"

Defines a requirement as "must contain uppercase character"

integerR_CONTAIN_LOWERCASE108
#

Defines a requirement as "must contain lowercase character"

Defines a requirement as "must contain lowercase character"

integerR_CONTAIN_NUMBER109
#

Defines a requirement as "must contain number"

Defines a requirement as "must contain number"

integerR_CONTAIN_NONALPHANUM110
#

Defines a requirement as "must contain non-alphanumeric character"

Defines a requirement as "must contain non-alphanumeric character"

integerR_VAL_LT111
#

Defines a requirement as "numeric value must be lower than"

Defines a requirement as "numeric value must be lower than"

integerR_VAL_GT112
#

Defines a requirement as "numeric value must be greater than"

Defines a requirement as "numeric value must be greater than"

integerR_VAL_RANGE113
#

Defines a requirement as "must be within a supplied range of values"

Defines a requirement as "must be within a supplied range of values"

integerR_VAL_LTE114
#

Defines a requirement as "numeric value must be lower than or equal to"

Defines a requirement as "numeric value must be lower than or equal to"

integerR_VAL_GTE115
#

Defines a requirement as "numeric value must be greater than or equal to"

Defines a requirement as "numeric value must be greater than or equal to"

integerE_NONSCALAR400
#

Error when a value is non-scalar

Error when a value is non-scalar

Properties summary

public staticAlo\Validators\Form$this
#

Static reference to the last instance of the class

Static reference to the last instance of the class

protected array$data
#

Supplied data array

Supplied data array

protected array$binds
#

Element requirements

Element requirements

protected array$evaluation
#

Data array post-evaluation

Data array post-evaluation

AloFramework documentation API documentation generated byApiGen 2.8.0