joeybloggs
330b12dacd
Phase 1 optimization complete, Phase 2 ( Warm liquid goo phase ) commencing
...
Still looking good
```
benchmark old ns/op new ns/op delta
BenchmarkFieldSuccess-4 167 119 -28.74%
BenchmarkFieldFailure-4 701 653 -6.85%
BenchmarkFieldDiveSuccess-4 2937 2488 -15.29%
BenchmarkFieldDiveFailure-4 3536 3059 -13.49%
BenchmarkFieldCustomTypeSuccess-4 341 292 -14.37%
BenchmarkFieldCustomTypeFailure-4 679 679 +0.00%
BenchmarkFieldOrTagSuccess-4 1157 1146 -0.95%
BenchmarkFieldOrTagFailure-4 1109 1063 -4.15%
BenchmarkStructLevelValidationSuccess-4 694 559 -19.45%
BenchmarkStructLevelValidationFailure-4 1311 551 -57.97%
BenchmarkStructSimpleCustomTypeSuccess-4 894 641 -28.30%
BenchmarkStructSimpleCustomTypeFailure-4 1496 1302 -12.97%
BenchmarkStructPartialSuccess-4 1229 1071 -12.86%
BenchmarkStructPartialFailure-4 1838 1685 -8.32%
BenchmarkStructExceptSuccess-4 961 927 -3.54%
BenchmarkStructExceptFailure-4 1218 1068 -12.32%
BenchmarkStructSimpleCrossFieldSuccess-4 954 779 -18.34%
BenchmarkStructSimpleCrossFieldFailure-4 1569 1405 -10.45%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-4 1588 1299 -18.20%
BenchmarkStructSimpleCrossStructCrossFieldFailure-4 2217 1917 -13.53%
BenchmarkStructSimpleSuccess-4 925 519 -43.89%
BenchmarkStructSimpleFailure-4 1650 1323 -19.82%
BenchmarkStructSimpleSuccessParallel-4 261 149 -42.91%
BenchmarkStructSimpleFailureParallel-4 758 543 -28.36%
BenchmarkStructComplexSuccess-4 5868 3387 -42.28%
BenchmarkStructComplexFailure-4 10767 8498 -21.07%
BenchmarkStructComplexSuccessParallel-4 1559 1114 -28.54%
BenchmarkStructComplexFailureParallel-4 3747 3163 -15.59%
```
8 years ago
joeybloggs
c0a414dc9e
initial un-refined new caching system
8 years ago
joeybloggs
cdfcf16a86
fix some minor listing.
8 years ago
joeybloggs
93bb347253
Update validations for "url" and "uri" because of Go 1.6 changes
...
added checks for blank and fragment/suffix because of Go 1.6 change 617c93ce74 (diff-6c2d018290e298803c0c9419d8739885L195)
fix was to emulate browser and strip the '#' suffix prior to validation. see #237
9 years ago
Kevin Seidel
851787be1b
Add unicode email tests
9 years ago
joeybloggs
bf5ac690d6
Add a couple more test cases
9 years ago
joeybloggs
4cb9152af0
correct IsUPDAddrResolvable functions
9 years ago
joeybloggs
faf40fd62f
Correct validation for TCPAddrResolvable
9 years ago
joeybloggs
7b758151c6
Add workaround for go issue
9 years ago
Hubert Krauze
ee0ce7d37e
Add test for tcp/udp/ip/unix addresses resolve
9 years ago
joeybloggs
afbcf59553
Add FieldNamespace and NameNamespace
...
* Add FieldNamespace and NameNamespace to FieldError. This allows for having the CustomName i.e. JSON namespace contained within the NameNamespace which would be very useful when using a more restful API approach.
9 years ago
joeybloggs
934bef0ce5
Add new Anonymous test to hit new code
...
* now have 100% test coverage again.
9 years ago
joeybloggs
d451d57023
Update benchmarks + correct benchmark error
...
* Fix error with BenchmarkFieldFailure, it was recording a successful
run.
* Update some benchmarks, they were showing allocations for the creation
of the data not just processing it.
9 years ago
joeybloggs
24c1c6819f
Add nostructlevel tag
...
* nostructlevel - Same as structonly tag except that any struct level
validations will not run.
9 years ago
joeybloggs
29403404e4
Added Helper method to Report errors from struct level.
9 years ago
joeybloggs
f1acffdfe0
Add Struct Level Validation!
9 years ago
joeybloggs
1570c9b6b3
Update Error message quotes to single quotes
...
* helps reduce noise when transmitting errors via JSON.
for #199
9 years ago
Hubert
9ffc753204
add cidr, cidrv4 and cidrv6 validators
...
- add validate functions
- add tests
- put validators as builtin in docs
9 years ago
joeybloggs
3cef97a452
minor speed improvements
...
* added check for "-" in custom field name
9 years ago
İlker Göktuğ Öztürk
5bc0ff91f8
configurable field name support
9 years ago
joeybloggs
36c0f0aa99
Update for repo move
...
* moved from bluesuncorp org to go-playground org
9 years ago
joeybloggs
830d270923
Expose Methods for Custom functions
...
Exposed previously unexposed functions for use within custom functions.
* ExtractType
* GetStructFieldOK
9 years ago
joeybloggs
14df416126
Update Validator instance check
...
* change for one validator instance method and message
9 years ago
Joel Williams
715aa553c8
Added checking for nil receiver on Validator methods
9 years ago
joeybloggs
70cb087d5a
update how config is passed in and assigned to validator
...
* makes it safer as options passed in by reference, in the future, will
not be manipulatable externally.
9 years ago
joeybloggs
10cf645b91
reorganization of code + variables to more appropriate structs
9 years ago
joeybloggs
4807bf93bb
unexpose baked in validators map for safety.
9 years ago
joeybloggs
a964f5384a
Completed 100% test coverage for alis registration
9 years ago
joeybloggs
407aac458f
Update Alias logic
...
- Unexport Alias Map in order to preserve any custom user aliases that
may conflict with new aliases added to the library itself....need to
copy them for each new validator.
- update error to report alias tag as the error tag and add actualTag to
know what it would have actually been.
9 years ago
joeybloggs
2cda50fb41
Add Tag Alias + basic tests
...
so far so good
9 years ago
joeybloggs
43d7f25cfb
update nefield and necsfield to hav own logic instead of calling !eqfield...
9 years ago
joeybloggs
14b90946b3
Backport v7 updates
...
backporting v7 updates for the near released v7.
9 years ago
joeybloggs
387cfe5aa9
Complete adding StructPartial and StructExcept
...
for issue-#149
9 years ago
joeybloggs
656ae32e8b
Updated PanicMatches after assertion library updates
...
now panic less, instead of panicing when data types do not match
in the field and cross field validations, the validation just
fails, because it's true i.e. does nil != 5 pass
or does nil == "string" nope fail
9 years ago
joeybloggs
844f5f46f7
Updated Panic Tests after updates to assertion library
9 years ago
joeybloggs
8ae139a445
Partially Merged in Partial struct methods + Tests
9 years ago
joeybloggs
1fbc384272
Complete test coverage for gecsfield, gtecsfield, ltcsfield and ltecsfield
9 years ago
joeybloggs
327aa2e826
Add gtcsfield, gtecsfield, ltcsfield and ltecsfield
9 years ago
joeybloggs
cd50c5e085
Added necsfield method + tests
9 years ago
joeybloggs
3a0791591a
Add cross struct map support for all types not just string
9 years ago
joeybloggs
4cbf0659ce
convert isLtField & isLteField to use new functions + test coverage
9 years ago
joeybloggs
5989727cf7
complete test coverage for IsGteField after conversion
9 years ago
joeybloggs
8aea478060
Update isGtField to user new functions
9 years ago
joeybloggs
2fe52ca08f
finish eqcsfield + test coverage
9 years ago
joeybloggs
d19088f865
Code Cleanup + some renaming
9 years ago
joeybloggs
81e29d3724
Complete Test Cases for getStructFieldOK
9 years ago
joeybloggs
2ea9043764
update to handle nested map + Array + Slice structs
9 years ago
joeybloggs
3ab458c80c
Updates
...
Split out Type checking.
Add Cross Field determination function for future automatic cross struct
namespace field validation.
9 years ago
joeybloggs
50f0798342
Run gofmt -s -w . on code
...
code cleanup, only a few changes.
9 years ago
joeybloggs
7e97fcf2c4
Add exists tag
...
exists tag used to ensure that a Pointer, Interface or
Invalid has a value, but won't interfere with any other validation.
9 years ago