Skip to content

Error message in the proper order #98

Open
@RaghavendhraK

Description

@RaghavendhraK
{
    "type": "object",
    "properties": {
        "customer": {
             "type": "object",
             "properties": {
                "name": {
                     "type": "string",
                     "required": true
                  }
             }
        },
        "user": {
            "type": "object",
            "properties":{
                "name": {
                    "type": "string",
                    "required": true
                }
            }
        }
    }
}

and if I provided the value like

{
    "customer": {  },
    "user": {  }
}

Then I get the error like

{
    "errors": [
        {
            "attribute": "required",
            "property": "user.name",
            "expected": true,
            "message": "is required"
        },
        {
            "attribute": "required",
            "property": "customer.name",
            "expected": true,
            "message": "is required"
        }
    ]
}

That is the order of the error message is wrong. I need to get customer and then user.

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