{% extends 'standard-form.njk' %}
{% from "textarea/macro.njk" import govukTextarea %}
{% set errorMap = {
    'conditions-not-met-reason': {
      'string.empty': { ref: '#conditions-not-met-reason', text: 'You have not entered which conditions have not been completed' },
      'string.max': { ref: '#conditions-not-met-reason', text: 'You have entered too many characters'}
    }
  } %}
{% set title = 'List these conditions and describe why they have not been completed' %}
{% block pageTitle %}
  {{ 'Error: ' + title if error else title }}
{% endblock %}
{% block pageContent %}
  <p class="govuk-body">If there are outstanding planning conditions relevant to this application, it may:</p>
  <ul class="govuk-list govuk-list--bullet">
    <li>delay a decision</li>
    <li>cause the application to be rejected</li>
  </ul>
{{ govukTextarea({
  name: "conditions-not-met-reason",
  id: "conditions-not-met-reason",
  value: data.conditionsNotMetReasonValue if data.conditionsNotMetReasonValue else payload['conditions-not-met-reason'],
  maxlength: 4000,
  errorMessage: { text: "List the conditions and why they have not been completed" } if error['conditions-not-met-reason']
}) }}
{% endblock %}
