Brimbox Logo Brimbox Version 2.3.4 Released


Method to check if email is valid.

Class: bb_validate, called as $main

File: bb_validate.php (php)


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


$test = $main->validate_email($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: $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 boolean true on error. Method always returns false on successful validation.

Updated: 2016-07-09