{% set message = form.inline_errors and form.messages ? "FORM.VALIDATION_FAIL"|t : form.message %} {{ {'status':form.status, 'message':message}|json_encode|raw }}