Releases: go-playground/validator
Release 9.9.1
What was fixed?
There was an issue checking for the end of an or validation block and when 2 consecutive or
validation blocks existed, it would not return an error or return an incorrect error.
NOTE: This bug only affected validation with consecutive or
validation blocks eg.
validate:"tag1|tag2=,tag3|tag4"
block1 = tag1|tag2=
block2 = tag3|tag4
Thanks for reporting the issue @skryja, see #329 for more details
Release 9.9.0
What's new?
Added map key validation support with new keys
and endkeys
eg.
type Test struct {
Map map[string]string `validate:"dive,keys,trim,endkeys,trim"`
}
keys
must be directly after the dive tag; this was done for efficiency to allow map keys and values to be be handled within the same range.
see docs for more details.
Release 9.8.0
What was added?
Added unique
validation for ensuring array|slice
contain unique values.
Release 9.7.0
Release 9.6.0
What's new?
Added hostname
and fqdn
validations thanks to @senuphtyz and PR #298
Release 9.5.0
What new?
Added contextual validation support via context.Context
: thanks to @thaonx @NUXIER and PR #292
RegisterValidationCtx(...)
RegisterStructValidationCtx(...)
StructCtx(...)
StructFilteredCtx(...)
StructPartialCtx(...)
StructExceptCtx(...)
VarCtx(...)
VarWithValueCtx(...)
NOTE: in v10 release all old methods will be removed and only new Context methods will remain.
Release 8.18.2
What was fixed?
Backported some test fixes to solve false positives
Release 9.4.0
What's new?
- Add Access to Field Name from FieldLevel interface via
FieldLevel.FieldName()
andFieldLevel.StructFieldName()
- Renamed examples directory to
_examples
to avoid any potential dependencies in examples being pulled in by go tools.
Release 9.3.6
What was fixed?
- Some more typos in the documentation.
- Updated README to fix rendering issue with GitHub's new markdown parser.
Release 9.3.5
What was fixed?
- Corrected some typos in README which Fixes #273
- updated lint issue in one of the tests
- Updated Benchmarks for Go 1.8