- 
                Notifications
    
You must be signed in to change notification settings  - Fork 123
 
Open
Description
{
    "pnr": "bddddd",
    "quantity": 100,
    "flightType": "direct",
    "platform": {
        "groupWindowOffice": true,
        "groupWindowB2B": false,
        "serpOffice": true,
        "serpB2B": false
    }
}
I want to validate the platform nested struct but it doesn't validating. Further more it gives me error if I try to create rules like document. So I've to do it like this way "platform.*"
	rules := govalidator.MapData{
		"pnr":         []string{"required"},
		"quantity":    []string{"required"},
		"platform.groupWindowOffice": []string{"required"},
		"platform.groupWindowB2B":    []string{"required"},
		"platform.serpOffice":        []string{"required"},
		"platform.serpB2B":           []string{"required"},
	}
But this is not validating the nested data it always shows me data required. Will you please help me to find the solution
Metadata
Metadata
Assignees
Labels
No labels