-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Improve the 'post_max_size_message' for form that don't include file uploads. #35011
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
Comments
Thank you for this issue. |
Nope, this has simply been dormant, it is still relevant AFAIK. |
I am not sure that we can do anything here without breaking BC. But there is the |
That's good enough, but only after customizing.
|
Because people may rely on the current wording (in tests for example). |
Ok, I can see how that may play out. |
I think so yes. Given that making the transition in a BC way is quite difficult and the fact that the message is already customizable I don't expect anything to change here to be honest. |
Thank you for this issue. |
Friendly ping? Should this still be open? I will close if I don't hear anything. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Symfony version(s) affected
All
Description
When POST-ing a form that exceeds the
post_max_size
limit of PHP, the Symfony validation message should not be exclusively about file uploads, since we can have forms submitted without any file uploads, which could lead to confusion.Suggestion
Before: 'The uploaded file was too large. Please try to upload a smaller file.'
After: 'The combination of submitted content and uploaded files was too large. Please try to reduce the size of the submitted content or upload smaller files.'
Example
By setting
php.ini
to a really small value:post_max_size=2
and submitting a form with a simple text field (
TextType::class
),the resulting error is:
The text was updated successfully, but these errors were encountered: