Skip to content
Advertisement

Why wont lumen recognize fields being sent

Greeting folks.

I am playing around with a third party api and I have a field required in lumen like:

   $this->validate($request, [
            'url' => 'required|string'
        ]);

but when I send the url in postman i keep getting that it is not sent

enter image description here

Anyone knows why it is not recognizing the url sent?

Advertisement

Answer

As per the documentation form field validation is not supported in lumen could you try json body instead :

body as raw > json

and send

{

"url" :"the url"

}

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement