public static function validate($type, $data, $extraData = NULL) { if (in_array($type, self::getValidationTypes())) { if (strtolower($type) === 'regexp' && validate::regexp($extraData, $data)) { return TRUE; } else { if (method_exists("validate", $type) && validate::$type($data)) { return TRUE; } } } errorHandle::errorMsg("Entry, " . htmlSanitize($data) . ", is not valid."); return FALSE; }