This fixes a few documentation issues I noticed.
- Explain what Func is supposed to return.
- Remove change reference to ActualNamespace to mention StructNamespace
instead.
- Remove references to Validatable, which no longer exists.
- Fix godoc formatting.
- Delete extra text from ReportValidationErrors comment.
- Change ReportError interface definition so its arguments are named
consistently with what they do.
- 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
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
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.
updated baked in functions:
hasLengthOf
isGt
isGte
isLt
isLte
to use utf8.RuneCountInString for string length comparisons, not counting multi-bye
characters but runes in string length comparisons.