Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sytha's avatar
Level 1

I got symfony error message on production server.

My laravel project is working in localhost with validation error message but when deploy to server it show symfony error message instead of validation error message.

Someone please share your experience. Thank you

0 likes
8 replies
Sinnbeck's avatar

Try setting the post_max_size on the server to a larger value

If that is high enough, please post the validation logic :)

sytha's avatar
Level 1

$rules = [ 'title' => 'required|string|min:1|max:191', 'publish_date' => 'nullable', 'feature_image' => 'required|file|max:1024|mimes:jpeg,jpg,png,gif', 'description' => 'required', ];

    $data = $request->validate($rules);

here the rules for validate.

tinkerbell's avatar

@sytha it looks like you are trying to upload an image which is more than 1024 kilobytes you validated your image and gives a rule max:1024 change it or upload a smaller size image

sytha's avatar
Level 1

I knew that. what i want is to display error message like in localhost. can you check the two links above to see it. the first error not the right way to show user that message.

Please or to participate in this conversation.