validate($valName, $val); if ($error != null) { $failures = array_merge($failures, $error); $had_errors = true; } } return $had_errors; } }