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.