snipplet forum and basically my class will accept 2 paramaters.
Code: Select all
function checkerrors($type,$required)THe required variable is a set of pre-defined variables that should exist, and also their validation type is passed to the function.
Code: Select all
$accepted_post = array( 'responseURL' => 'isWebAddress', 'responseFormat' => 'isInt');
if ($builderr->checkerrors($_POST,$accepted_post)) {Code: Select all
if (function_exists(formValidator::$required[$varname]($value))) {
$valid = formValidator::$required[$varname]($value);
}
else {
trigger_error('Invalid Validation Format: formValidator::'.$required[$varname].'()',E_USER_ERROR);
}run this code to see if the function exists I get an error like the following
Why can't I call the class function this way?Fatal error: Invalid Validation Format: formValidator::isInt() in /home/jcart/httpdoc/class/class.builderrors.php on line 25