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

Update without_class.rst #20487

Open
wants to merge 2 commits into
base: 7.3
Choose a base branch
from

Conversation

issamkhadiri1989
Copy link
Contributor

@issamkhadiri1989 issamkhadiri1989 commented Dec 19, 2024

hello

when trying to add several validation constraints (setup an array of constraints for a given form field) in the Constraints At Class Level, an error is raised as described in the following screenshot :

image

Symfony version : 7.2.1
PHP version : 8.2.20

Steps to reproduce the bug:

Step 1

create a controller like described in the doc

image

Step 2

render the form

image

Step 3

Go to the page http://localhost/contact

the error is raised

image

to make sure that the problem is coming from the

'lastName' => [
    new NotBlank(),
    new Length(['min' => 3]),
],

change this configuration by either remove the entire config or just do

'lastName' =>new NotBlank(),

(use Constraint instead of an array)

and the result is as follows

image

the form is rendered with no problems

thanks in advance,

@carsonbot carsonbot added this to the 7.3 milestone Dec 19, 2024
@abdosql
Copy link

abdosql commented Dec 20, 2024

I was able to reproduce the bug, and I encountered the same issue.

@MatTheCat
Copy link
Contributor

MatTheCat commented Dec 31, 2024

I think you can update your PR by reverting #19094 and targeting the 6.4 branch.

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

Successfully merging this pull request may close these issues.

4 participants