Skip to content

Non relevant validations errors #36

Open
@mohamed-abdul-fattah

Description

@mohamed-abdul-fattah

I've downloaded the package, and I'm trying to create an API with it. But when it comes to validations e.g. users registration, it throws this object
{ "message": "The given data failed to pass validation.", "status_code": 500 }

while the official lumen throws this object with relevant errors
{ "name": [ "The name field is required." ], "email": [ "The email field is required." ] }

And here is my validation code in UsersController.php at store method
$validation = $this->validate($request, [ 'name' => 'required', 'email' => 'required' ]);

So, what is missing here to throw this general message?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions