Commit graph

161 commits

Author SHA1 Message Date
joeybloggs
e42d7b683a determined variable values to be passed
for #74
2015-07-11 20:55:21 -04:00
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!
2015-07-10 11:31:53 -04:00
joeybloggs
e1fd32247f Fix interface issue when value is set but no validation tag exists 2015-07-09 14:06:48 -04:00
joeybloggs
562e77833a change to use native sync.Pool
for #98
2015-07-05 11:31:09 -04:00
joeybloggs
92bd6b335a code cleanup
for #88
2015-06-29 20:14:58 -04:00
joeybloggs
f604b6cc96 Complete Flatten logic
for #88
2015-06-29 20:10:13 -04:00
joeybloggs
4d57165562 fix wrong variable used in checking for "[" char
for #85
2015-06-29 09:53:08 -04:00
joeybloggs
7d55bfddde complete flatten logic for array elements
for #85
2015-06-29 09:48:57 -04:00
joeybloggs
c7ff296dca correct interface issue
add handling of interface validation by determining it's type

for issue #85
2015-06-28 21:51:39 -04:00
joeybloggs
200a5b4aad finish map error handling & complete test coverage
for #78
2015-06-27 13:41:33 -04:00
joeybloggs
8bf793acde correct map references pointing to slice after copy/paste
for#78
2015-06-27 08:22:37 -04:00
joeybloggs
14f176e8ac add traverseMap
for #78
2015-06-26 10:18:17 -04:00
joeybloggs
98f4165fae added time test
fix issue with time.Time data type validation
2015-06-26 09:57:02 -04:00
joeybloggs
a0f6d14ada add more tests
correct pointer issue is traverseArray

for #78
2015-06-26 08:41:37 -04:00
joeybloggs
689d3e9989 finalized array error handling
for #78
2015-06-26 07:47:12 -04:00
joeybloggs
1ba858eec1 correct FieldError error printing idea issue
for #78
2015-06-26 07:38:28 -04:00
joeybloggs
6eded1f817 correct error output and index out of order error
for #78
2015-06-26 07:28:15 -04:00
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
2015-06-25 17:24:25 -04:00
joeybloggs
4afdc19aef Finish initial array traversal logic
for #78
2015-06-25 09:15:46 -04:00
joeybloggs
a3cf2f5cf3 Merge branch 'v5-development' into add-array-slice-map-dive-support 2015-06-20 12:04:41 -04:00
joeybloggs
e0e86490bf Fix Issue with nested struct as pointer being nil
for #79
2015-06-20 11:56:16 -04:00
joeybloggs
e0bfa17b22 add initial dive logic 2015-06-20 10:04:55 -04:00
joeybloggs
9ff11ae808 break out benchmarks into separate file
create examples file for better godocs
2015-06-10 22:03:57 -04:00
joeybloggs
fcbf6b65e4 add caching pool of StructErrors to reuse objects, reduce garbage collection and reduce memory allocations
for #56
2015-06-08 21:27:00 -04:00
joeybloggs
0fbc3228e8 rework code to allow handling of comma (,) and = within the params i.e. excludesall=,=
add test cases for comma and = validation within params
add documentation stating how to include a comma within the parameters

for #67
2015-06-08 20:42:16 -04:00
joeybloggs
793099be40 remove trimming of param option as space could be a valid param option or char
for #63
2015-06-08 16:45:51 -04:00
joeybloggs
ad39bb92dd code cleanup 2015-06-07 23:40:23 -04:00
joeybloggs
6ffa5d1455 add thread safety note to AddFunction and SetTag functions 2015-06-07 23:25:14 -04:00
joeybloggs
8c2248a5ce add map thread safety 2015-06-07 23:22:13 -04:00
joeybloggs
0c5fbee316 code cleanup + variable renaming
restructure fieldWithNameAndSingleTag for speed + less allocations
2015-06-07 22:59:36 -04:00
joeybloggs
e4f2ff67bd add caching of field only tags, now less time, memory and only 2 allocations vs 9 2015-06-07 22:24:26 -04:00
joeybloggs
22d031deb0 add struct caching, significant speedup even in a simple test
NOTE: validating a single fields speed however was reduced and more memory allocations, need to correct this before marking caching as complete.
2015-06-07 21:39:21 -04:00
joeybloggs
beaa9adf31 minor performance updates
add benchmarks
2015-05-30 20:19:05 -04:00
joeybloggs
9d18657e1f remove extra carriage returns
for #44
2015-05-22 20:22:18 -04:00
joeybloggs
fd059fe2f1 remove unnecessary carriage returns
for #44
2015-05-22 20:17:32 -04:00
joeybloggs
b891b1cf3c add eq baked in function + tests
add eqfield baked in function + tests

for issue #35
2015-05-08 11:59:48 -04:00
Dean Karn
7ac98be692 changes in preparation for package rename to validator
update code for more idiomatic code
2015-04-10 00:30:30 -04:00
Dean Karn
1e1442d02c merge changes from Pull Request #24 from @manucorporat 2015-04-08 18:23:20 -04:00
Dean Karn
a3cb430fa1 issue-#20
add extra param of current struct.
2015-03-23 10:57:45 -04:00
Dean Karn
622107d990 issue-#18
add “structonly” tag for struct only and not field validation
2015-03-21 13:35:17 -04:00
Dean Karn
684c339b0d issue-#15
correct incorrect call to ValidateStruct and changed to
ValidateStructRecursive
2015-03-19 15:55:23 -04:00
Dean Karn
cfea08f69d issue-#14
remove internal validator.
2015-03-11 00:11:32 -04:00
Dean Karn
c0c54e6ddf issue-#12
add return of variable Type as well as Kind
2015-03-10 17:59:03 -04:00
Dean Karn
250bdade04 Merge branch 'v2-development' into v2
Conflicts:
	validator.go
2015-03-10 15:09:54 -04:00
Dean Karn
e882184fe2 issue-#11
update gt, gte, lt and let to handle dates compared to time.Now().UTC()
2015-03-10 15:07:00 -04:00
Dean Karn
191b1ce01f v2 add cross field validation ability 2015-03-06 11:38:21 -05:00
Dean Karn
ac82433503 Update to return FieldValidationError for single field validation
update to return FieldValidationError for single field validation
add Kind, Param and Value to the FieldValidationError struct to allow
for a more automated error handling api outside of this library.
2015-02-26 10:22:50 -05:00
Dean Karn
4e4a2a2b8e issue-#1
add url validation and test cases
add uri validation and test cases
2015-02-25 15:08:22 -05:00
Dean Karn
cbf8124403 issue-#7
add ‘or’ operator to allow multiple validators to be used instead of
just the implicit ‘and’
2015-02-15 10:54:06 -05:00
Dean Karn
e8eadfc326 issue-#1
add alpha validation function + Test code
add alphanumeric validation function + Test code
2015-02-14 21:26:15 -05:00