Skip to content

Alias not working for error messages path #27

@matapatos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions