Dean Karn
0277b12d53
Update README.md
6 years ago
Dean Karn
e69e9a28bb
Update README.md
6 years ago
Dean Karn
ab2a8a9908
Update README.md
6 years ago
Dean Karn
e055f4eb7f
Update README.md
6 years ago
Dean Karn
d942191d51
Update README.md
6 years ago
Dean Karn
ce9336f6e2
Update README.md
7 years ago
Dean Karn
fb72538343
Update README.md
7 years ago
Dean Karn
f28cb45dc0
Update README.md
7 years ago
Dean Karn
ffe836d736
Expanded numeric & number validations
...
It was originally intended for these to only be used on strings, however
it makes sense to also use them if your dealing with type interface{}
so now ints and floats return true for this validation also as they are
both numeric and numbers.
closes #356
7 years ago
Dean Karn
801c8790f3
Update README.md
7 years ago
Dean Karn
ee0bbdea51
increment version
7 years ago
Dean Karn
54da7fa48f
fix linting and spelling errors
7 years ago
Dean Karn
ff1ee42e83
Update README.md
7 years ago
Dean Karn
8ce234ff02
Update README.md
7 years ago
Dean Karn
150fe5b6a4
Update README.md
7 years ago
Dean Karn
535f85221e
Update README.md
7 years ago
Dean Karn
5e036656b8
Add hostname_rfc1123 validation
7 years ago
Dean Karn
3620d3c069
update docs for FieldWithValue=>VarWithValue
7 years ago
Dean Karn
b962f3d7d5
Correct Var tagCache locking
7 years ago
Dean Karn
230db62e07
update docs to clarify or vs tag separators ( #334 )
7 years ago
Dean Karn
b1f51f36f1
Correct consequtive or logic ( #330 )
7 years ago
Dean Karn
61caf9d303
add map key validation support ( #324 )
7 years ago
Dean Karn
1304298bf1
Update README.md
7 years ago
Dean Karn
34b84953ff
change related software
7 years ago
Dean Karn
11a1fab51d
Add unique validation
7 years ago
Dean Karn
0b5dc7605b
Add isdefault validation
7 years ago
Dean Karn
5c4193d98e
Update README.md
7 years ago
Dean Karn
44d9acf0a8
Update README.md
7 years ago
Dean Karn
0f6f568263
Add contextual validation support via context.Context ( #296 )
...
* Add contextual validation support via context.Context
Added:
- RegisterValidationCtx
- RegisterStructValidationCtx
- StructCtx
- StructFilteredCtx
- StructPartialCtx
- StructExceptCtx
- VarCtx
- VarWithValueCtx
7 years ago
Dean Karn
fb68f39656
Add Access to Field Name from FieldLevel ( #284 )
8 years ago
Dean Karn
27158c7a84
Update README.md
8 years ago
Dean Karn
755afb9dde
Update README.md
...
Adjustments due to GitHub's new markdown parser
8 years ago
Dean Karn
4bd1935852
Updated README
...
- Corrected some typos in README which Fixes #273
- Updated Benchmarks for Go 1.8
- updated lint issue in one of the tests
8 years ago
Dean Karn
b250b44763
Update test & benchmarks
...
- Updated failing test for new translation error message.
- Updated benchmarks with new machine at the same time.
8 years ago
Dean Karn
691ea55063
Update README.md
8 years ago
Dean Karn
077c3830f3
Correct Namespace when array or map of structs
...
namespace was incorrect when array or map of structs, see #266
8 years ago
Dean Karn
49fccadad1
correct structonly functionality
...
- structonly wasn’t behaving correctly when not used with an accompanying struct validation.
8 years ago
Dean Karn
4d76b0dd81
Add alphaunicode & aplhanumericunicode
...
- added unicode variants of alpha & alphanumeric
8 years ago
Dean Karn
4e43fa1562
change field cache to array
...
- errors now come out in order for unit tests
- speed improvement using array vs map
benchmark old ns/op new ns/op delta
BenchmarkFieldSuccess-8 101 100 -0.99%
BenchmarkFieldSuccessParallel-8 33.2 33.7 +1.51%
BenchmarkFieldFailure-8 323 332 +2.79%
BenchmarkFieldFailureParallel-8 112 113 +0.89%
BenchmarkFieldDiveSuccess-8 719 714 -0.70%
BenchmarkFieldDiveSuccessParallel-8 230 225 -2.17%
BenchmarkFieldDiveFailure-8 1001 987 -1.40%
BenchmarkFieldDiveFailureParallel-8 323 317 -1.86%
BenchmarkFieldCustomTypeSuccess-8 263 264 +0.38%
BenchmarkFieldCustomTypeSuccessParallel-8 82.6 81.4 -1.45%
BenchmarkFieldCustomTypeFailure-8 327 328 +0.31%
BenchmarkFieldCustomTypeFailureParallel-8 116 116 +0.00%
BenchmarkFieldOrTagSuccess-8 871 878 +0.80%
BenchmarkFieldOrTagSuccessParallel-8 394 402 +2.03%
BenchmarkFieldOrTagFailure-8 568 569 +0.18%
BenchmarkFieldOrTagFailureParallel-8 397 401 +1.01%
BenchmarkStructLevelValidationSuccess-8 332 267 -19.58%
BenchmarkStructLevelValidationSuccessParallel-8 105 82.4 -21.52%
BenchmarkStructLevelValidationFailure-8 637 557 -12.56%
BenchmarkStructLevelValidationFailureParallel-8 260 226 -13.08%
BenchmarkStructSimpleCustomTypeSuccess-8 525 452 -13.90%
BenchmarkStructSimpleCustomTypeSuccessParallel-8 155 144 -7.10%
BenchmarkStructSimpleCustomTypeFailure-8 828 738 -10.87%
BenchmarkStructSimpleCustomTypeFailureParallel-8 345 285 -17.39%
BenchmarkStructFilteredSuccess-8 744 664 -10.75%
BenchmarkStructFilteredSuccessParallel-8 274 257 -6.20%
BenchmarkStructFilteredFailure-8 595 517 -13.11%
BenchmarkStructFilteredFailureParallel-8 250 195 -22.00%
BenchmarkStructPartialSuccess-8 674 608 -9.79%
BenchmarkStructPartialSuccessParallel-8 256 225 -12.11%
BenchmarkStructPartialFailure-8 928 848 -8.62%
BenchmarkStructPartialFailureParallel-8 399 360 -9.77%
BenchmarkStructExceptSuccess-8 1076 934 -13.20%
BenchmarkStructExceptSuccessParallel-8 237 200 -15.61%
BenchmarkStructExceptFailure-8 873 787 -9.85%
BenchmarkStructExceptFailureParallel-8 365 333 -8.77%
BenchmarkStructSimpleCrossFieldSuccess-8 539 489 -9.28%
BenchmarkStructSimpleCrossFieldSuccessParallel-8 201 168 -16.42%
BenchmarkStructSimpleCrossFieldFailure-8 788 709 -10.03%
BenchmarkStructSimpleCrossFieldFailureParallel-8 322 299 -7.14%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8 795 683 -14.09%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8 241 211 -12.45%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8 1110 940 -15.32%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8 399 333 -16.54%
BenchmarkStructSimpleSuccess-8 367 285 -22.34%
BenchmarkStructSimpleSuccessParallel-8 108 91.0 -15.74%
BenchmarkStructSimpleFailure-8 776 698 -10.05%
BenchmarkStructSimpleFailureParallel-8 307 284 -7.49%
BenchmarkStructComplexSuccess-8 2224 1622 -27.07%
BenchmarkStructComplexSuccessParallel-8 718 526 -26.74%
BenchmarkStructComplexFailure-8 5350 4717 -11.83%
BenchmarkStructComplexFailureParallel-8 2097 1853 -11.64%
8 years ago
Dean Karn
493dfb6209
correct required tag functionality for pointers, now works like old `exists` tag.
8 years ago
Dean Karn
506cc5da56
Add Filter logic
8 years ago
Dean Karn
0c0ae405d3
Update README.md
8 years ago
Dean Karn
23e84d2f88
Update README.md
8 years ago
Dean Karn
cddc415625
perf enhancements + corrected issue with or's
...
- or's weren't reporting the param back in the tag, long standing but noticed issue.
- added validation check for or's when more validations exist after the or.
8 years ago
Dean Karn
7c2b5d8471
Update README.md
8 years ago
Dean Karn
0e70fdfc72
add translation example + documentation
8 years ago
Dean Karn
a7ca4a1d32
add default translations for "en"
...
- need help creating more.
8 years ago
Dean Karn
0af0043f29
update CI badge to v9
8 years ago
Dean Karn
a7cc53a707
documentation, examples and template updates.
8 years ago
Dean Karn
9ba3297c49
Update benchmarks run against Go 1.7
...
Go 1.7 some nice boosts, for nothing!
```
benchmark old ns/op new ns/op delta
BenchmarkFieldSuccess-8 147 108 -26.53%
BenchmarkFieldSuccessParallel-8 42.5 35.7 -16.00%
BenchmarkFieldFailure-8 417 320 -23.26%
BenchmarkFieldFailureParallel-8 140 113 -19.29%
BenchmarkFieldDiveSuccess-8 876 726 -17.12%
BenchmarkFieldDiveSuccessParallel-8 277 263 -5.05%
BenchmarkFieldDiveFailure-8 1185 939 -20.76%
BenchmarkFieldDiveFailureParallel-8 402 382 -4.98%
BenchmarkFieldCustomTypeSuccess-8 321 268 -16.51%
BenchmarkFieldCustomTypeSuccessParallel-8 104 87.8 -15.58%
BenchmarkFieldCustomTypeFailure-8 416 310 -25.48%
BenchmarkFieldCustomTypeFailureParallel-8 150 131 -12.67%
BenchmarkFieldOrTagSuccess-8 1119 889 -20.55%
BenchmarkFieldOrTagSuccessParallel-8 462 418 -9.52%
BenchmarkFieldOrTagFailure-8 715 546 -23.64%
BenchmarkFieldOrTagFailureParallel-8 436 450 +3.21%
BenchmarkStructLevelValidationSuccess-8 399 336 -15.79%
BenchmarkStructLevelValidationSuccessParallel-8 140 123 -12.14%
BenchmarkStructLevelValidationFailure-8 749 611 -18.42%
BenchmarkStructLevelValidationFailureParallel-8 296 298 +0.68%
BenchmarkStructSimpleCustomTypeSuccess-8 673 555 -17.53%
BenchmarkStructSimpleCustomTypeSuccessParallel-8 213 197 -7.51%
BenchmarkStructSimpleCustomTypeFailure-8 1056 811 -23.20%
BenchmarkStructSimpleCustomTypeFailureParallel-8 450 370 -17.78%
BenchmarkStructPartialSuccess-8 789 676 -14.32%
BenchmarkStructPartialSuccessParallel-8 307 301 -1.95%
BenchmarkStructPartialFailure-8 1105 1001 -9.41%
BenchmarkStructPartialFailureParallel-8 493 436 -11.56%
BenchmarkStructExceptSuccess-8 1212 1038 -14.36%
BenchmarkStructExceptSuccessParallel-8 282 281 -0.35%
BenchmarkStructExceptFailure-8 1004 863 -14.04%
BenchmarkStructExceptFailureParallel-8 452 379 -16.15%
BenchmarkStructSimpleCrossFieldSuccess-8 656 549 -16.31%
BenchmarkStructSimpleCrossFieldSuccessParallel-8 211 192 -9.00%
BenchmarkStructSimpleCrossFieldFailure-8 968 783 -19.11%
BenchmarkStructSimpleCrossFieldFailureParallel-8 406 296 -27.09%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8 1000 837 -16.30%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8 334 284 -14.97%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8 1324 1110 -16.16%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8 520 416 -20.00%
BenchmarkStructSimpleSuccess-8 534 380 -28.84%
BenchmarkStructSimpleSuccessParallel-8 144 114 -20.83%
BenchmarkStructSimpleFailure-8 1039 760 -26.85%
BenchmarkStructSimpleFailureParallel-8 419 353 -15.75%
BenchmarkStructComplexSuccess-8 2678 2100 -21.58%
BenchmarkStructComplexSuccessParallel-8 874 662 -24.26%
BenchmarkStructComplexFailure-8 6342 5080 -19.90%
BenchmarkStructComplexFailureParallel-8 2875 2159 -24.90%
benchmark old allocs new allocs delta
BenchmarkFieldSuccess-8 0 0 +0.00%
BenchmarkFieldSuccessParallel-8 0 0 +0.00%
BenchmarkFieldFailure-8 4 4 +0.00%
BenchmarkFieldFailureParallel-8 4 4 +0.00%
BenchmarkFieldDiveSuccess-8 11 11 +0.00%
BenchmarkFieldDiveSuccessParallel-8 11 11 +0.00%
BenchmarkFieldDiveFailure-8 16 16 +0.00%
BenchmarkFieldDiveFailureParallel-8 16 16 +0.00%
BenchmarkFieldCustomTypeSuccess-8 2 2 +0.00%
BenchmarkFieldCustomTypeSuccessParallel-8 2 2 +0.00%
BenchmarkFieldCustomTypeFailure-8 4 4 +0.00%
BenchmarkFieldCustomTypeFailureParallel-8 4 4 +0.00%
BenchmarkFieldOrTagSuccess-8 1 1 +0.00%
BenchmarkFieldOrTagSuccessParallel-8 1 1 +0.00%
BenchmarkFieldOrTagFailure-8 5 5 +0.00%
BenchmarkFieldOrTagFailureParallel-8 5 5 +0.00%
BenchmarkStructLevelValidationSuccess-8 2 2 +0.00%
BenchmarkStructLevelValidationSuccessParallel-8 2 2 +0.00%
BenchmarkStructLevelValidationFailure-8 8 8 +0.00%
BenchmarkStructLevelValidationFailureParallel-8 8 8 +0.00%
BenchmarkStructSimpleCustomTypeSuccess-8 2 2 +0.00%
BenchmarkStructSimpleCustomTypeSuccessParallel-8 2 2 +0.00%
BenchmarkStructSimpleCustomTypeFailure-8 9 9 +0.00%
BenchmarkStructSimpleCustomTypeFailureParallel-8 10 10 +0.00%
BenchmarkStructPartialSuccess-8 6 6 +0.00%
BenchmarkStructPartialSuccessParallel-8 6 6 +0.00%
BenchmarkStructPartialFailure-8 11 11 +0.00%
BenchmarkStructPartialFailureParallel-8 11 11 +0.00%
BenchmarkStructExceptSuccess-8 12 12 +0.00%
BenchmarkStructExceptSuccessParallel-8 5 5 +0.00%
BenchmarkStructExceptFailure-8 10 10 +0.00%
BenchmarkStructExceptFailureParallel-8 10 10 +0.00%
BenchmarkStructSimpleCrossFieldSuccess-8 3 3 +0.00%
BenchmarkStructSimpleCrossFieldSuccessParallel-8 3 3 +0.00%
BenchmarkStructSimpleCrossFieldFailure-8 8 8 +0.00%
BenchmarkStructSimpleCrossFieldFailureParallel-8 8 8 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8 4 4 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8 4 4 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8 9 9 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8 9 9 +0.00%
BenchmarkStructSimpleSuccess-8 0 0 +0.00%
BenchmarkStructSimpleSuccessParallel-8 0 0 +0.00%
BenchmarkStructSimpleFailure-8 9 9 +0.00%
BenchmarkStructSimpleFailureParallel-8 9 9 +0.00%
BenchmarkStructComplexSuccess-8 8 8 +0.00%
BenchmarkStructComplexSuccessParallel-8 8 8 +0.00%
BenchmarkStructComplexFailure-8 53 53 +0.00%
BenchmarkStructComplexFailureParallel-8 53 53 +0.00%
benchmark old bytes new bytes delta
BenchmarkFieldSuccess-8 0 0 +0.00%
BenchmarkFieldSuccessParallel-8 0 0 +0.00%
BenchmarkFieldFailure-8 192 192 +0.00%
BenchmarkFieldFailureParallel-8 192 192 +0.00%
BenchmarkFieldDiveSuccess-8 201 201 +0.00%
BenchmarkFieldDiveSuccessParallel-8 201 201 +0.00%
BenchmarkFieldDiveFailure-8 396 396 +0.00%
BenchmarkFieldDiveFailureParallel-8 397 397 +0.00%
BenchmarkFieldCustomTypeSuccess-8 32 32 +0.00%
BenchmarkFieldCustomTypeSuccessParallel-8 32 32 +0.00%
BenchmarkFieldCustomTypeFailure-8 192 192 +0.00%
BenchmarkFieldCustomTypeFailureParallel-8 192 192 +0.00%
BenchmarkFieldOrTagSuccess-8 16 16 +0.00%
BenchmarkFieldOrTagSuccessParallel-8 16 16 +0.00%
BenchmarkFieldOrTagFailure-8 208 208 +0.00%
BenchmarkFieldOrTagFailureParallel-8 208 208 +0.00%
BenchmarkStructLevelValidationSuccess-8 32 32 +0.00%
BenchmarkStructLevelValidationSuccessParallel-8 32 32 +0.00%
BenchmarkStructLevelValidationFailure-8 288 288 +0.00%
BenchmarkStructLevelValidationFailureParallel-8 288 288 +0.00%
BenchmarkStructSimpleCustomTypeSuccess-8 32 32 +0.00%
BenchmarkStructSimpleCustomTypeSuccessParallel-8 32 32 +0.00%
BenchmarkStructSimpleCustomTypeFailure-8 392 392 +0.00%
BenchmarkStructSimpleCustomTypeFailureParallel-8 408 408 +0.00%
BenchmarkStructPartialSuccess-8 256 256 +0.00%
BenchmarkStructPartialSuccessParallel-8 256 256 +0.00%
BenchmarkStructPartialFailure-8 464 464 +0.00%
BenchmarkStructPartialFailureParallel-8 464 464 +0.00%
BenchmarkStructExceptSuccess-8 480 480 +0.00%
BenchmarkStructExceptSuccessParallel-8 240 240 +0.00%
BenchmarkStructExceptFailure-8 448 448 +0.00%
BenchmarkStructExceptFailureParallel-8 448 448 +0.00%
BenchmarkStructSimpleCrossFieldSuccess-8 72 72 +0.00%
BenchmarkStructSimpleCrossFieldSuccessParallel-8 72 72 +0.00%
BenchmarkStructSimpleCrossFieldFailure-8 288 288 +0.00%
BenchmarkStructSimpleCrossFieldFailureParallel-8 288 288 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8 80 80 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8 80 80 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8 304 304 +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8 304 304 +0.00%
BenchmarkStructSimpleSuccess-8 0 0 +0.00%
BenchmarkStructSimpleSuccessParallel-8 0 0 +0.00%
BenchmarkStructSimpleFailure-8 392 392 +0.00%
BenchmarkStructSimpleFailureParallel-8 392 392 +0.00%
BenchmarkStructComplexSuccess-8 128 128 +0.00%
BenchmarkStructComplexSuccessParallel-8 128 128 +0.00%
BenchmarkStructComplexFailure-8 2833 2833 +0.00%
BenchmarkStructComplexFailureParallel-8 2833 2833 +0.00%
```
8 years ago