Brimbox Logo Brimbox Version 2.3.4 Released

validate_numeric>>

Method to test whether a string is numeric.

Class: bb_validate, called as $main

File: bb_validate.php (php)

Declaration:

function validate_numeric(&$field, $error = false)

Usage:

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

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

Note: Method is called from $main->validate_logic as a callback function.

Parameter: $fielde (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 boolean true on error. Method always returns false on successful validation.

Updated: 2016-07-09