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

romulo27's avatar

Validation with Lumen.

Can I validate the class in a Lumen api, how do I use it and an api laravel application?

0 likes
2 replies
bobbybouwmann's avatar

So basically this is important information for you from that documentation page at the bottom:

Lumen does not support sessions out of the box, so the $errors view variable that is available in every view in Laravel is not available in Lumen. Should validation fail, the $this->validate helper will throw Illuminate\Validation\ValidationException with embedded JSON response that includes all relevant error messages. If you are not building a stateless API that solely sends JSON responses, you should use the full Laravel framework.

Please or to participate in this conversation.