Returns whether has error

@return bool
422198
public function hasError($attribName = null)
    {
        if (is_null($attribName)) {
            return count($this->invalidAttribs) > 0 || count($this->missingAttribs) > 0;
        } else {
            return isset($this->invalidAttribs[$attribName]) || isset($this->missingAttribs[$attribName]);
        }
    }
677007
public function hasErrors($attribute = null): bool
    {
        $errors = $this->getErrors();
        return $attribute === null ? !empty($errors) : isset($errors[$attribute]);
    }
775223
public function is_error($result = null)
    {
        if ($result !== null) {
            return $result === false ? $this->db_error_msg : null;
        }

        return $this->db_error ? $this->db_error_msg : null;
    }
483768
public function hasErrors($name = null)
    {
        if (!$name) {
            return !empty($this->errors);
        }

        return isset($this->errors[$name]);
    }
146698
public function isValid()
    {
        foreach ($this->validators as $validator) {
            if (!$validator->isValid()) {
                // Prepare error messages
                foreach ($validator->getErrors() as $name => $messages) {
                    if (!isset($this->errors[$name])) {
                        $this->errors[$name] = array();
                    }

                    $this->errors[$name] = $messages;
                }
            }
        }

        return !$this->hasErrors();
    }
1106433
public function getFirstError()
    {
        foreach ($this->models as $model) {
            if ($model->hasErrors()) {
                $errors = $model->getFirstErrors();

                return array_shift($errors);
            }
        }

        return false;
    }
1049581
public function getError() {
        if ($this->error) {
            return $this->translate($this->error);
        }
        if ($this->form->model && is_object($this->form->model) && $this->form->model->hasErrors($this->name)) {
            $errors = $this->form->model->getErrors($this->name);
            foreach ($errors as &$message) {
                $message = $this->translate($message);
            }
            return $errors;
        }
        return null;
    }
361420
public function check()
	{
		// Is data valid?
		if (!$this->_tbl->check())
		{
			$this->_errors = $this->_tbl->getErrors();
			return false;
		}
		return true;
	}
176826
public function isValid() {

		$params = $this -> getParameters();

		if(false === isset($params[0])) {
			return trigger_error(sprintf('Missing argument 1 for %s', __METHOD__), E_USER_ERROR);
		}

		if(false === is_string($params[0])) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($params[0])), E_USER_ERROR);
		}

		foreach($this -> getValues() as $fieldname => $value) {

			if($fieldname == $params[0]) {
				return $value == $this -> getValue();
			}
		}

		return true;
	}
919734
public function hasErrorMessages() {
      $messages = $this->getMessages();
      foreach ($messages as $message) {
        if ($message->mt == 'error') {
          return true;
        }
      }
      return false;
    }
313837
public function isValid()
    {
        $this->errorMessages = [];
        $this->validatorCollection->rewind();
        while ($this->validatorCollection->valid()) {
            $this->checkForErrors($this->validatorCollection->current());
            $this->validatorCollection->next();
        }
        $count = count($this->errorMessages);
        return $count == 0;
    }
624996
public function has_error( $key ) {
		return $this->errors
				&& array_key_exists( $key, $this->errors->errors )
				&& count( $this->errors->errors[ $key ] ) > 0;
	}
1167892
public function getFirstError()
    {
        if (!$this->model) {
            return false;
        }

        $errors = $this->model->getErrors()->errors();

        return (count($errors) > 0) ? $errors[0] : false;
    }
1351536
public function hasError($field=null){
        if($field == null){
            return count($this->errors) > 0;
        }
        return array_key_exists($field, $this->errors);
    }
1089936
public function hasHttpError(): bool
    {
        $httpStatus = new NanoHttpStatus();

        return $httpStatus->isClientError($this->httpStatusCode) || $httpStatus->isServerError($this->httpStatusCode);
    }
318511
public function hasMessages()
    {
        return !empty($this->notices) || !empty($this->warnings) || !empty($this->errors) || !empty($this->exception);
    }
369257
public function isValid(?array &$errors = null): bool
	{
		[$isValid, $errors] = $this->process();

		return $isValid === true;
	}