Skip to content

Alias not working for error messages path #27

Description

@matapatos

Currently if we have an endpoint like the one bellow, the error messages retrieved would be something like:

<?php
$router->post('/', function (#[Alias('form')] ContactUs $contactUsData) {
// ...
});
{
    "code": 422,
    "message": "Invalid data",
    "data": {
        "status": 422,
        "errors": [
            {
                "field": "contactUsData.name",
            }
        ]
    }
}

The field name should be form.name instead of contactUsData.name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions