Commit graph

297 commits

Author SHA1 Message Date
Dean Karn
d802346da4 Merge pull request #136 from bluesuncorp/v6-development
V6 development
2015-07-30 22:30:47 -04:00
Dean Karn
a05046f9e7 Merge pull request #135 from joeybloggs/v6-development
Add handling of custom types
2015-07-30 22:29:11 -04:00
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 )
2015-07-30 22:24:43 -04:00
Dean Karn
55e8c8d9ca Merge pull request #129 from bluesuncorp/v6-development
Add ip, ipv4, ipv6 and mac validators
2015-07-27 22:47:55 -04:00
Dean Karn
a7e8a12f07 Merge pull request #128 from joeybloggs/v6-development
Add ip, ipv4, ipv6 and mac validators
2015-07-27 22:47:29 -04:00
joeybloggs
143b21eba1 Add mac validator 2015-07-27 22:45:59 -04:00
joeybloggs
bd16331fc0 Add ip, ipv4 and ipv6 validators 2015-07-27 22:31:33 -04:00
Dean Karn
c0001173ee Merge pull request #127 from bluesuncorp/v6-development
Update Required & Invalid logic
2015-07-27 17:24:39 -04:00
Dean Karn
a56318009b Merge pull request #126 from joeybloggs/v6-development
Update Required & Invalid logic
2015-07-27 17:23:50 -04:00
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
2015-07-27 17:20:42 -04:00
Dean Karn
54927e92d9 Merge pull request #124 from bluesuncorp/v6-development
Slit out assertion funcs. & add single field validation example
2015-07-26 21:53:31 -04:00
Dean Karn
f4625158e0 Merge pull request #123 from joeybloggs/v6-development
Add single Field validation example
2015-07-26 21:50:47 -04:00
joeybloggs
ea0db1fa47 Add single Field validation example 2015-07-26 21:48:27 -04:00
Dean Karn
c59a51f3e9 Merge pull request #122 from joeybloggs/v6-development
Split out assertions and put in external repo
2015-07-23 16:51:23 -04:00
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.
2015-07-23 16:48:13 -04:00
Dean Karn
b9cdaa4346 Merge pull request #121 from bluesuncorp/v6-development
Update Docs. and Benchmarks
2015-07-23 12:52:11 -04:00
Dean Karn
781f596065 Merge pull request #120 from joeybloggs/v6-development
Update Docs. and Benchmarks
2015-07-23 12:49:30 -04:00
joeybloggs
aef21d4d30 Update Benchmarks
Split out benchmarks into Success and Failure for more realistic numbers.
I was validating 2 structs within the benchmarks, both a Successful and
Failing struct which was artificially inflating the numbers.
2015-07-23 12:44:17 -04:00
joeybloggs
a5d0ef37b8 update doc.go, some v5 specific notes were left. 2015-07-23 12:30:29 -04:00
Dean Karn
a87651c07b Update README.md
fix badge
2015-07-20 08:54:31 -04:00
Dean Karn
fd0f7cd349 Merge pull request #119 from bluesuncorp/v6-development
V6 development
2015-07-20 08:52:20 -04:00
Dean Karn
06ad2498ab Merge pull request #118 from joeybloggs/v6-development
V6 development
2015-07-20 08:50:01 -04:00
joeybloggs
cdc48b4f90 Fix Bug in Ptr tests 2015-07-20 08:45:29 -04:00
joeybloggs
506e57e4d7 Merge remote-tracking branch 'upstream/v6-development' into v6-development 2015-07-20 08:21:17 -04:00
Dean Karn
b009996c4a Update README.md
update badge to proper branch
2015-07-19 21:47:54 -04:00
Dean Karn
d078eb5498 Merge pull request #117 from bluesuncorp/v6-development
V6 development
2015-07-19 21:43:32 -04:00
Dean Karn
9e60f7d11b Merge pull request #116 from joeybloggs/v6-development
V6 development
2015-07-19 21:42:27 -04:00
joeybloggs
2baa4bd353 Minor code cleanup 2015-07-19 21:39:58 -04:00
Dean Karn
347979cec7 Delete .travis.yml
no longer needed changed CI to semaphore
2015-07-19 12:07:01 -04:00
Dean Karn
2a2b70052e Merge pull request #115 from bluesuncorp/v6-development
V6 development
2015-07-19 11:43:53 -04:00
Dean Karn
ae135ef613 Update README.md
Change CI to Semaphore
2015-07-19 11:41:32 -04:00
Dean Karn
fbc15ff5c6 Merge pull request #114 from joeybloggs/v6-development
V6 development
2015-07-19 11:39:25 -04:00
joeybloggs
41b4a43989 Updated documentation for new v6 2015-07-19 10:48:16 -04:00
joeybloggs
933fe0b7a9 Add test for comma and pipe obfuscation 2015-07-17 09:31:20 -04:00
joeybloggs
e005b06f11 Add Field Tag caching
now the benchmarks are getting back to awesome!
2015-07-16 22:45:36 -04:00
joeybloggs
e2a5b9881e Add ValidationErrs Caching
when no errors occur, let's reuse the existing object.
2015-07-16 09:24:18 -04:00
joeybloggs
4bdd703409 Remove old validator code
was just keeping around for reference when converting.
2015-07-16 08:25:54 -04:00
joeybloggs
07f2263b41 Benchmark Updates
Renamed for better clarity.
Added Field OrTag Benchmark.
2015-07-16 08:24:27 -04:00
joeybloggs
7f4b49c751 Finished Tests, now at 100% test converage! 2015-07-16 08:20:20 -04:00
joeybloggs
4ce39526f6 Update Test Case + fix errors
Updated all tests to comply with new api.
Fix a few bugs found with validation.
2015-07-15 23:29:31 -04:00
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.
2015-07-15 09:30:07 -04:00
joeybloggs
88cc19b9e1 Add traverseMap function 2015-07-15 07:45:28 -04:00
joeybloggs
4d2ffbedfc Added traverseSlice function 2015-07-14 23:11:59 -04:00
joeybloggs
019c5fc4ac Finished converting baked in functions & some updates
completed all validations function conversion.
updated omitempty check to continue if all ok instead of
passing tag to be validated.
2015-07-14 22:45:37 -04:00
joeybloggs
68ba87af24 More Progess
added single field validation function.
updated a few more baked in functions.
added back single field validation benchmark.
2015-07-14 21:10:25 -04:00
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.
2015-07-14 13:36:55 -04:00
joeybloggs
953cc993e6 Merge remote-tracking branch 'upstream/v5' into v6-development 2015-07-13 15:53:34 -04:00
Dean Karn
ac33a23e6e Merge pull request #113 from bluesuncorp/v5-development
update string comparisons to use utf8.RuneCountInString
2015-07-13 14:48:03 -04:00
Dean Karn
8a9bd75ae8 Merge pull request #112 from joeybloggs/v5-development
update to use utf8.RuneCountInString for string length
2015-07-13 14:43:39 -04:00
joeybloggs
89e9d9731d update to use utf8.RuneCountInString for string length comparisons
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.
2015-07-13 14:21:06 -04:00