Brimbox Logo Brimbox Version 2.3.4 Released

validate_logic>>

Method to test datatype or constraints on a Brimbox input string, usually used when taking input for the data_table.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function validate_logic($type, &$field, $error = false)

Usage:

$test = $main->validate_logic($type, $field, $error);

Returns: Error message string or boolean true on error, false on successful validation.

Note: Passes $field as a value for optional formatting.

Note: Method uses global array $array_validation which passes in callback functions.

Parameter: $type (string)
Name of the validation type, key of $array_validation array.

Parameter: $field (string)
Value to be validated, passed as a value so it can be formatted and validated at the same time.

Parameter: $error (boolean)
If $error is true, will return the error message string on error. If $error is false, will return true on error. Method always returns false on successful validation.

Updated: 2016-07-17