Extension:Validator/0.2

Parameter definition
Keys:


 * aliases: Optional. Array. When omitted, empty array will be assumed.
 * required: Optional. Boolean. When omitted, false will be assumed.
 * type: Optional. String. Values like string, integer, number, ect. When omitted, string will be assumed. The type will be used to create additional criteria. New types can be added via Validator class hook.
 * output-type: Array. String. Allows to do conversions on the resulting value. These can be array, list, js item list, ect.
 * criteria: Optional. Associative Array. When omitted, empty array will be assumed. Each array element has the criteria name as it's key, and criteria specifications in an array as value. New criteria definitions can be added via Validator class hook.
 * default: Optional. Mixed. When omitted, empty string will be assumed.

List example:

$yourParameters['parameterName'] = array (	'type' => array('integer', 'list', ';'),	'output-type' => array('list', ','),	'criteria' => array( 'in_array' => array(42, 420, 4242), ),	'default' => array(4242, 420) );

An input of  will turn into   (string).

2nd list example:

$yourParameters['parameterName'] = array (	'type' => array('integer', 'list'),	'criteria' => array( 'in_range' => array(0, 1000), ), );

An input of  will turn into , and add an error for 4242.

Integer example:

$yourParameters['parameterName'] = array (	'type' => 'integer',	'criteria' => array( 'in_range' => array(0, 100), 'is_prime' => array ),	'default' => 42 );