Adds ValidateMap which can be used to validate map[string]interface{} against a validation map in the form map[string]interface{}. The validation map values can be either a string in the same form as the tags used in structs (without the key valid) or a map[string]interface{} for recursive validation. The map to be validated can contain values of any kind.
Example usage added in the README (copied from #224)
Adds
ValidateMap
which can be used to validatemap[string]interface{}
against a validation map in the formmap[string]interface{}
. The validation map values can be either a string in the same form as the tags used in structs (without the keyvalid
) or amap[string]interface{}
for recursive validation. The map to be validated can contain values of any kind.Example usage added in the README (copied from #224)
It also adds custom tag
type(type)
to validate map values of typeinterface{}
. However, it can be used with any type. Example of types it can take:fixes #224