Validation

Validating input.

Functions

validate($type, &$value, $convert = true, $extra = null)

Validate $value according to $type. If $convert is true then $value is modified to be requested type if it is not. Usually this conversion means converting numeric strings to int or float and time based strings to DateTime.

Types supported: