Releases: go-playground/validator
Release 5.7
add ability to use comma and = in params i.e. excludesall=,=
added some struct caching pool to reuse objects, reduce garbage collection and reduce memory allocations.
new benchmarks:
Old Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4 5000000 333 ns/op 16 B/op 1 allocs/op
BenchmarkValidateStructSimple-4 500000 2597 ns/op 752 B/op 13 allocs/op
BenchmarkTemplateParallelSimple-4 1000000 1138 ns/op 753 B/op 13 allocs/op
BenchmarkValidateStructLarge-4 100000 14663 ns/op 4806 B/op 78 allocs/op
BenchmarkTemplateParallelLarge-4 200000 7112 ns/op 4810 B/op 78 allocs/op
New Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4 5000000 318 ns/op 16 B/op 1 allocs/op
BenchmarkValidateStructSimple-4 500000 2471 ns/op 624 B/op 10 allocs/op
BenchmarkTemplateParallelSimple-4 2000000 975 ns/op 624 B/op 10 allocs/op
BenchmarkValidateStructLarge-4 100000 13979 ns/op 4293 B/op 66 allocs/op
BenchmarkTemplateParallelLarge-4 200000 5947 ns/op 4298 B/op 66 allocs/op
Release 5.6.1
Remove trimming of param option in tags as space could be a valid param option or char
for #63
Release 5.6
Implemented automatic struct and field schema/metadata caching
merged a documentation fix, thanks @xboston
New Performance Numbers!
Original Benchmarks
$ go test -bench=. -benchmem=true
PASS
BenchmarkValidateField 2000000 651 ns/op 176 B/op 5 allocs/op
BenchmarkValidateStruct 200000 6274 ns/op 1584 B/op 37 allocs/op
Optimized No Cache Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4 3000000 473 ns/op 80 B/op 4 allocs/op
BenchmarkValidateStructSimple-4 300000 5010 ns/op 1200 B/op 33 allocs/op
BenchmarkTemplateParallelSimple-4 1000000 2185 ns/op 1200 B/op 33 allocs/op
BenchmarkValidateStructLarge-4 50000 28706 ns/op 6980 B/op 201 allocs/op
BenchmarkTemplateParallelLarge-4 200000 14362 ns/op 6983 B/op 201 allocs/op
Optimized Cached Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4 5000000 333 ns/op 16 B/op 1 allocs/op
BenchmarkValidateStructSimple-4 500000 2597 ns/op 752 B/op 13 allocs/op
BenchmarkTemplateParallelSimple-4 1000000 1138 ns/op 753 B/op 13 allocs/op
BenchmarkValidateStructLarge-4 100000 14663 ns/op 4806 B/op 78 allocs/op
BenchmarkTemplateParallelLarge-4 200000 7112 ns/op 4810 B/op 78 allocs/op
Release 5.5.1
minor performance updates
Release 5.5
converted to native go testing
not changes but updating the testing file
Release 5.4
remove extra line breaks in error statements
add contains, containsany, containsrune, excludes, excludesall and excludes rune validation functions.
Release 5.2
add "ne" and "nefield" validation functions + tests + documentation
Release 5.1
Added 'eq' validator + tests + documentation
Added 'eqfield' validator + tests + documentation
Added to blank tag check to include Time, which is a struct and was passing through the check
Release 5.0.2
resolve release 5.0.1 issue
Release 5.0.1
Merge pull request from @muyiwaolurin for verbiage updates
added base64 validator
update some minor verbiage