Support the ongoing development of Laravel.io →
posted 11 years ago
Validation

Hi, i want to format MessageBag before going to toJson and i was thinking if it's possible to do something like this or do i have to modify MessageBag myself?

$messages = $validator->messages()->setFormat('<p>:message</p>')->toJson();
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Feefty feefty Joined 31 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.