Releases: go-playground/validator
Release 9.13.0
What's New?
Added Brazilian Portuguese translations see PR #350 Thanks @afranioce
Release v9.12.0
Release 9.11.0
Release 9.10.0
What's new?
Added new validation hostname_rfc1123 the current hostname validation is for RFC 952
###I want to use the new hostname validation, but don't want to go around and change my struct tags.
No problem, just register an Alias eg.
validate := validator.New()
validate.RegisterAlias("hostname", "hostname_rfc1123")Release 9.9.4
Release 9.9.3
What was fixed?
Update tagCache locking scope to allow for validate.Var and validate.VarCtx to be used from within validations functions. see #335 for details.
Release 9.9.2
What was fixed/updated?
Updated docs to clarify between validation tag separator or , and or validation tag separator |
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.