Skip to content

[DX] [Form] form isSubmitted isValid #13706

@94noni

Description

@94noni

Hi,

According to the symfony best practices part on form
it could be great to only have one function to do the "job" of this part

before
if ($form->isSubmitted() && $form->isValid()) {}

after
if ($form->isSubmittedAndValid()) {}

I know the the isSubmitted is only here so that the logic is more understandable when reading, but is redundant to write both, no?

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