Michael DaSilva
Michael DaSilva

Reputation: 157

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?

Upvotes: 1

Views: 43

Answers (1)

PDHide
PDHide

Reputation: 19929

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

Upvotes: 4

Related Questions