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

Form Validation Error for Array input #29905

Closed
r8or0pz opened this issue Jan 16, 2019 · 8 comments
Closed

Form Validation Error for Array input #29905

r8or0pz opened this issue Jan 16, 2019 · 8 comments
Labels

Comments

@r8or0pz
Copy link

r8or0pz commented Jan 16, 2019

After upgrading symfony/form to v4.2.2 from v4.2.1, I'm having form validation error. Actually, I think it's correct behavior now, because an input data is an Array while form element is of TextType. Not sure why it was working before though :) To solve the issue, I tried to use Data Transformers, however both transform callable arguments are empty for some reason. How can I resolve it?

@cvilleger
Copy link
Contributor

I have the same error ! I lost hours to understand that... The only solution I have is to downgrade to 4.2.1

@r8or0pz
Copy link
Author

r8or0pz commented Jan 16, 2019

I have the same error ! I lost hours to understand that... The only solution I have is to downgrade to 4.2.1

I also rolled back to 4.2.1.

@dmaicher
Copy link
Contributor

dmaicher commented Jan 16, 2019

See
#29809

#29841

@xabbuh
Copy link
Member

xabbuh commented Jan 16, 2019

I just proposed #29911 which could hopefully mitigate the impact a bit.

@xabbuh xabbuh added the Form label Jan 16, 2019
@ThibDums
Copy link

I have the same error ! I lost hours to understand that... The only solution I have is to downgrade to 4.2.1

How did you downgrade to 4.2.1 ? You have to downgrade all packages versions too ?

@r8or0pz
Copy link
Author

r8or0pz commented Jan 17, 2019

I have the same error ! I lost hours to understand that... The only solution I have is to downgrade to 4.2.1

How did you downgrade to 4.2.1 ? You have to downgrade all packages versions too ?

composer require symfony/form:4.2.1

@xabbuh
Copy link
Member

xabbuh commented Jan 21, 2019

I'd appreciate if everyone affected by the issue described here could give their feedback on #29911. :) Please note that we are not going to change the behaviour of the TextType nor any other non-compound type provided by the core, but the proposed fix could resolve issues you might have experienced in your custom types.

@nicolas-grekas
Copy link
Member

Closing as not a bug, see linked issues.

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

No branches or pull requests

6 participants