Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Check form is submited before validation #100

@fmarchalemisys

Description

@fmarchalemisys

Symfony 4 fails with error "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." in Form/Handler/EmailFormHandler.php at line 91.

The following code isn't valid any more:

    public function processForm(FormInterface $form, Request $request)
    {
        $valid = false;
        $form->handleRequest($request);
        if ($form->isValid()) {

The same code is found in LayoutFormHandler.php.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions