- 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.
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
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 )
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
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.
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.
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.
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.