Commit graph

37 commits

Author SHA1 Message Date
joeybloggs
14b90946b3 Backport v7 updates
backporting v7 updates for the near released v7.
2015-08-19 13:05:04 -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
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
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
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
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
zhing
3bece518fa Merge branch 'v5-development' of https://gopkg.in/bluesuncorp/validator.v5 into v5-development 2015-07-12 13:22:45 +08:00
zhing
0fa8dd2a3e add validate:len=? support for utf-8 2015-07-12 13:22:36 +08:00
joeybloggs
35aff710e4 added many new validator + tests + documentation:
ascii
printascii
multibyte
datauri
latitude
longitude
ssn
2015-06-17 09:02:26 -04:00
joeybloggs
7aa70841bc add uuid, uuid3, uuid4 and uuid5 validators + tests + documentation 2015-06-17 08:03:31 -04:00
joeybloggs
20d9b7909f add isbn, isbn10 and isbn validators + tests + documentation 2015-06-16 23:22:36 -04:00
joeybloggs
3dcc019b64 add contains, contains any, contains rune, excludes, excludes and excludesrune validation functions + tests + docuemtation
for #43
2015-05-22 22:28:40 -04:00
joeybloggs
23c3fa6b63 add ne and nefield functions to validator 2015-05-19 15:20:34 -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
1d008b4ad2 add base64 validate as requested in issue #30 2015-04-19 10:13:14 -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
edb25ac80e issue-#13
add generic cross field validation for Number and time.Time data types
2015-03-10 23:34:19 -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
46e519deac issue-#8
update to provide 100% test coverage
2015-03-01 10:34:51 -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
2073d33609 issue-#1
add lt validation function + test code
add lte validation function + test code
add gt validation function + test code
add get validation function + test code
2015-02-15 23:20:33 -05:00
Dean Karn
beb87b1d05 issue-#1
add rgb color validation function + Test Code
add rgba color validation function + Test Code
add hsl color validation function + Test Code
add hula color validation function + Test Code
2015-02-15 10:03:12 -05:00
Dean Karn
dfe8a4e7fa issue-#1
add numeric validation function + Test Cases
add number validation function + Test Cases
add hexadecimal validation function + Test Cases
add hexcolor validation function + Test Cases
add email validation function + Test Cases
2015-02-14 22:16:03 -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
Dean Karn
23cff6eddb issue-#4
add documentation
2015-02-14 13:00:48 -05:00
Dean Karn
b2f3d55b2c issue-#3
add tests for existing functions.
2015-02-13 14:23:21 -05:00
Dean Karn
cff7604ce7 function rename 2015-02-12 22:43:23 -05:00
Dean Karn
05d2507495 add omit empty check
allow for optional value checking
2015-02-12 22:42:16 -05:00
Dean Karn
1b249998b2 code cleanup 2015-02-12 21:42:24 -05:00
Dean Karn
aad5727a16 initial working commit 2015-02-12 20:49:57 -05:00