<!DOCTYPE html>

<html>
<head>
  <title>test</title>
</head>

<body>
{{ test(_context) }}
{% macro test(_context) %}
  {{ hasErrors('formName') }}
  {{ hasGlobalErrors('formName') }}
  {{ hasFieldErrors('formName', 'testField') }}

  {{ hasErrors('') }}
  {{ hasGlobalErrors('') }}
  {{ hasFieldErrors('formName', '') }}

  {% for err in getAllErrors('formName') %}{{ err }}{% endfor %}
  {% for err in getGlobalErrors('formName') %}{{ err }}{% endfor %}
  {% for err in getFieldErrors('formName', 'testField') %}{{ err }}{% endfor %}

  {% for err in getAllErrors('') %}{{ err }}{% endfor %}
  {% for err in getGlobalErrors('') %}{{ err }}{% endfor %}
  {% for err in getFieldErrors('', 'testField') %}{{ err }}{% endfor %}
  {% for err in getFieldErrors('formName', '') %}{{ err }}{% endfor %}
{% endmacro %}
</body>
</html>