validator
validator copied to clipboard
Validate nested maps with unknown keys
Package version v10
Question:
Is there a way to validate nested maps with unknown keys?
Something like the following:
rules := map[string]interface{
"params": map[string]interface{
"*": map[string]interface{
"id": "required",
"value": "number",
}
}
}
So parameters could be nil, if not, the key could be anything, but if it does exist, it has to have id and a number value.
hi. Any news?
I don't even remember what was that for.