1.7.18. Errors drop (up)
示例: 获取所有错误
{% for error in form.errors %} attribute: {{ error.attribute }} ... {% endfor %}
1.7.18.1. 方法
1.7.18.1.1. empty?
如果没有错误,返回 true
{% if form.errors == empty %} Congratulations! You have no errors! {% endif %}
1.7.18.1.2. present?
如果有错误,返回 true
{% if form.errors == present %} Sorry, there were some errors. {% endif %}