The validate hook is the hook called to validate your input after it has been parsed. The default expected error for a validation error by the error hook is a map[string]error . By default the hook use ozzo-validationarrow-up-right.
map[string]error
A validate hook must have this signature:
type ValidateHook func(ctx context.Context, input interface{}) error
Check out the default validate hook implementation herearrow-up-right.
Check out the signature of the validate hookarrow-up-right.
Last updated 5 years ago