public function fieldValid($field) { $result = !isset($this->errors[$field]) || count($this->errors[$field]) === 0; return $result; }