1.7.18. Errors ドロップ (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 %}