Releases: go-playground/validator
Release 5.8.1
Fix Issue with nested struct as pointer being nil causing validation to fail
Release 5.8
RGB and RGBA regexes
updated to properly validate rgb 255 or rgb percentabe, it no longer allows mixing and matching; either all percentages or all numbers from 0-155
GODOC
Added some godoc examples to better illustrate functions usages
Validators
A huge shout out to @asaskevich for having allot of these validations that I ported from his govalidator, I would not have been able to add them so quickly without his groundwork, Thanks!
ADDED:
isbn10
isbn13
uuid
uuid3
uuid4
uuid5
ascii
printascii
multibyte
datauri
latitude
longitude
ssn
Release 5.7.1
merge change forgot to call new method in test to maintain my 100% test coverage
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