Search code examples
phplaravelapipostmanlumen

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?


Solution

  • 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