Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Make:registration-form] Form errors are not handled #1453

Closed
juanvlro opened this issue Feb 16, 2024 · 1 comment · Fixed by #1455
Closed

[BUG] [Make:registration-form] Form errors are not handled #1453

juanvlro opened this issue Feb 16, 2024 · 1 comment · Fixed by #1455

Comments

@juanvlro
Copy link

How to reproduce

Use attribute "no validate" in the registration form.

{{ form_start(registrationForm, {
    'attr': {
        'novalidate': 'novalidate'
    }
}) }}

{# ... #}

{{ form_end(registrationForm) }}

Nothing appears when clicking "S'inscrire" (no violations or form errors in the debug bar either):

Capture d’écran 2024-02-16 à 17 00 36

Expected behavior :

Capture d’écran 2024-02-16 à 17 03 08

How to fix

Replace :

return $this->render('registration/register.html.twig', [
    'registrationForm' => $form->createView(),
]);

with :

return $this->render('registration/register.html.twig', [
    'registrationForm' => $form,
]);
@mdoutreluingne
Copy link
Contributor

I haven't managed to reproduce the bug by starting again with a new project. I have form violations and errors appearing in my form.

However, I've still created a PR to remove the creatView() methods, as it's no longer needed to render the form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants