Pre-release v4.0.0-rc3
Pre-release
Pre-release
System-Glitch
released this
27 Dec 14:56
·
610 commits
to master
since this release
- Use
*validation.Context
in validation message placeholders. Thevalidation.Placeholder
signatures becomesfunc(fieldName string, language string, ctx *validation.Context) string
. This is a breaking change. - Added
Extra
(map[string]interface{}
) to*validation.Context
. This allows placeholders to use additional information given by the validator function. - Added
validation.StructList
. This acts as a better alternative syntax for validation. The previous alternative syntax (*validation.Rules
) should not be used for validation rules definition anymore but still works.