How to pass non field specific form error message to twig?

In top of my twig login form I have

{{ form_errors(form) }}

after authentication fail, I want to pass a wrong password message here. In my controller I have:

echo $twig->render('login.html', 
['form' => $form->createView(),
 'title' => 'title',
 'form.errors' => array('wrong pass');
]);

But I assume form.errors is a wrong param to pass non-field-specific errors to twig form. How can I do this? I probably have to add my symfony form is standalone, NOT framework.

Any answer yet please?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.