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
joeybloggs
d2ea21ad15
Add RegisterCustomTypeFunc for easier adding of CustomTypeFunc
...
Thanks @johnniedoe for ths pull request!
9 years ago
joeybloggs
d363ed316c
Add handling of custom types
...
can add custom type handling, example: sql driver Valuer
can override any base data type like string or int ( I'd be carefull about that, but you can )
9 years ago
joeybloggs
143b21eba1
Add mac validator
9 years ago
joeybloggs
bd16331fc0
Add ip, ipv4 and ipv6 validators
9 years ago
joeybloggs
e078205c78
Update Required & Invalid logic
...
updated required validator to check for a nil value for types:
slice, map, pointer, interface, channel and function.
updated tranverseField to handle invalid field type.
Changes to be committed:
modified: baked_in.go
modified: doc.go
modified: validator.go
modified: validator_test.go
9 years ago
joeybloggs
201c892979
Split out assertions and put in external repo
...
split our assertion functions like IsEqual, Equal, NotEqual, PanicMatches etc...
into another library https://github.com/bluesuncorp/assert so that I can use them
in other projects.
9 years ago
joeybloggs
cdc48b4f90
Fix Bug in Ptr tests
9 years ago
joeybloggs
933fe0b7a9
Add test for comma and pipe obfuscation
9 years ago
joeybloggs
7f4b49c751
Finished Tests, now at 100% test converage!
9 years ago
joeybloggs
4ce39526f6
Update Test Case + fix errors
...
Updated all tests to comply with new api.
Fix a few bugs found with validation.
9 years ago
joeybloggs
24d46304a8
Updating & re-injecting tests
...
updating test for the new error return formet
updated assertion functions to handle a nil Map,Slice,Ptr.....type
fixed hasValue check not comparing Interface but field Value.
9 years ago
joeybloggs
7af3fb7c1f
initial validation logic reworked
...
initial function layouts and validation completed, still need to rework
all of the baked in functions, add map and array traversal and add back original
test cases.
NOTE: a far more pragmatic validation tests will be added, but not until it has
been proven stable with at least the old tests.
9 years ago
joeybloggs
9596b89a26
working on traversing field values
...
whether it's a struct field or just a regular field
working on a single function to handle both to reduce
checking the same values within struct field recursion or
a regular field; this will also help reduce code complexity
and keep things DRY.
9 years ago
joeybloggs
e42d7b683a
determined variable values to be passed
...
for #74
9 years ago
joeybloggs
c62550c414
Investigating difference speed architectures
...
investigation if goroutines in a consumer producer pattern vs passing a map
Spoiler: the map wins out big time!
9 years ago
joeybloggs
9d2b8ee9d4
updated coverage tests to be 100%
9 years ago
joeybloggs
e1fd32247f
Fix interface issue when value is set but no validation tag exists
9 years ago
joeybloggs
89a5909004
add test to ensure 100% of the lines of code are called, even in the pool
10 years ago
joeybloggs
f604b6cc96
Complete Flatten logic
...
for #88
10 years ago
joeybloggs
4d57165562
fix wrong variable used in checking for "[" char
...
for #85
10 years ago
joeybloggs
7d55bfddde
complete flatten logic for array elements
...
for #85
10 years ago
joeybloggs
c7ff296dca
correct interface issue
...
add handling of interface validation by determining it's type
for issue #85
10 years ago
joeybloggs
200a5b4aad
finish map error handling & complete test coverage
...
for #78
10 years ago
joeybloggs
8bf793acde
correct map references pointing to slice after copy/paste
...
for#78
10 years ago
joeybloggs
14f176e8ac
add traverseMap
...
for #78
10 years ago
joeybloggs
98f4165fae
added time test
...
fix issue with time.Time data type validation
10 years ago
joeybloggs
a0f6d14ada
add more tests
...
correct pointer issue is traverseArray
for #78
10 years ago
joeybloggs
689d3e9989
finalized array error handling
...
for #78
10 years ago
joeybloggs
6eded1f817
correct error output and index out of order error
...
for #78
10 years ago
joeybloggs
d019d02290
Add some initial validation
...
change slice errors variable type to map[int]error to allow tracking of index of the error i the array
for #78
10 years ago
joeybloggs
4afdc19aef
Finish initial array traversal logic
...
for #78
10 years ago
joeybloggs
e0e86490bf
Fix Issue with nested struct as pointer being nil
...
for #79
10 years ago
joeybloggs
63a3b7e6ad
add multibyte test case for blank string to maintain 100% test coverage
10 years ago
joeybloggs
35aff710e4
added many new validator + tests + documentation:
...
ascii
printascii
multibyte
datauri
latitude
longitude
ssn
10 years ago
joeybloggs
7aa70841bc
add uuid, uuid3, uuid4 and uuid5 validators + tests + documentation
10 years ago
joeybloggs
20d9b7909f
add isbn, isbn10 and isbn validators + tests + documentation
10 years ago