josh
3df85bdcfc
p2sh validation and more tests
7 years ago
josh
60417282a4
verifies p2pkh addresses
7 years ago
josh
36d83b0b83
Added in validation function, tests, and docs
7 years ago
Kyriakos Georgiou
030800a855
Add validation for base64 URL safe values
7 years ago
Russ Egan
2e9adc3329
swapped mutex for rwmutex
...
similiar single-goroutine performance, slightly better concurrent performance.
7 years ago
Russ Egan
15217303f9
Add oneof validation
...
Validates that a string or number value equals one of a set of allowed values. Examples:
validator.Var(“red”, “oneof=red green”)
validator.Var(6, “oneof=6 7 8”)
7 years ago
Dean Karn
5e036656b8
Add hostname_rfc1123 validation
7 years ago
Dean Karn
61caf9d303
add map key validation support ( #324 )
7 years ago
Dean Karn
11a1fab51d
Add unique validation
7 years ago
Dean Karn
f16354ec03
Add isdefault + fix fqdn
...
Closes #299
Fixes #306
7 years ago
Aaron Lehmann
770163b1e1
Documentation fixes
...
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.
7 years ago
Dean Karn
0b5dc7605b
Add isdefault validation
7 years ago
Bruno Lorenz
dbd50b343f
Code hygiene
...
- Minor performance improve for FQDN validation
- Fix typo in documentation
- Simplified hostname regex
7 years ago
Bruno Lorenz
1669b6e0ee
Fixed "Assignment Branch Condition too high"
7 years ago
Bruno Lorenz
08796346a0
Append new validations
...
- hostname
- fqdn
7 years ago
Dean Karn
0f6f568263
Add contextual validation support via context.Context ( #296 )
...
* Add contextual validation support via context.Context
Added:
- RegisterValidationCtx
- RegisterStructValidationCtx
- StructCtx
- StructFilteredCtx
- StructPartialCtx
- StructExceptCtx
- VarCtx
- VarWithValueCtx
7 years ago
Dean Karn
4d76b0dd81
Add alphaunicode & aplhanumericunicode
...
- added unicode variants of alpha & alphanumeric
8 years ago
Dean Karn
493dfb6209
correct required tag functionality for pointers, now works like old `exists` tag.
8 years ago
joeybloggs
e0e1af6a61
working instance
8 years ago
joeybloggs
77f59a0ea0
corrected some spelling mistakes in documentation
8 years ago
joeybloggs
3ef55a89aa
fix some needed Type() calls.
8 years ago
joeybloggs
cdfcf16a86
fix some minor listing.
8 years ago
joeybloggs
e7749ea250
Update validations for "url" and "uri" because of Go 1.6 changes
...
added checks for blank and fragment/suffix because of Go 1.6 change 617c93ce74 (diff-6c2d018290e298803c0c9419d8739885L195)
fix was to emulate browser and strip the '#' suffix prior to validation. see #237
9 years ago
joeybloggs
93bb347253
Update validations for "url" and "uri" because of Go 1.6 changes
...
added checks for blank and fragment/suffix because of Go 1.6 change 617c93ce74 (diff-6c2d018290e298803c0c9419d8739885L195)
fix was to emulate browser and strip the '#' suffix prior to validation. see #237
9 years ago
joeybloggs
6851add4e4
Update to avoid double resolves
9 years ago
joeybloggs
4cb9152af0
correct IsUPDAddrResolvable functions
9 years ago
joeybloggs
faf40fd62f
Correct validation for TCPAddrResolvable
9 years ago
joeybloggs
7b758151c6
Add workaround for go issue
9 years ago
Hubert Krauze
def24ae611
Add Resolvable suffix to functions so they can be more meaningful
9 years ago
Hubert Krauze
5a99cf6052
Add validation functions for tcp/udp/ip/unix addresses
9 years ago
joeybloggs
0862513fbf
Add some string check optimizations
...
* was using len(string) for some blank checks instead of string == ""
9 years ago
joeybloggs
fc5d9f3ae0
Exposed Baked In Validators
...
* Exposed for use within custom functions.
9 years ago
Hubert
9ffc753204
add cidr, cidrv4 and cidrv6 validators
...
- add validate functions
- add tests
- put validators as builtin in docs
9 years ago
joeybloggs
830d270923
Expose Methods for Custom functions
...
Exposed previously unexposed functions for use within custom functions.
* ExtractType
* GetStructFieldOK
9 years ago
joeybloggs
8119861695
inline Regex calls
9 years ago
joeybloggs
10cf645b91
reorganization of code + variables to more appropriate structs
9 years ago
joeybloggs
a964f5384a
Completed 100% test coverage for alis registration
9 years ago
joeybloggs
407aac458f
Update Alias logic
...
- 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.
9 years ago
joeybloggs
2cda50fb41
Add Tag Alias + basic tests
...
so far so good
9 years ago
joeybloggs
ce06c47267
rename some variable for clarity
9 years ago
joeybloggs
43d7f25cfb
update nefield and necsfield to hav own logic instead of calling !eqfield...
9 years ago
joeybloggs
15fdf82c30
Update verbiage for unique features for v7 cross struct cross field validation tags.
9 years ago
joeybloggs
14b90946b3
Backport v7 updates
...
backporting v7 updates for the near released v7.
9 years ago
joeybloggs
656ae32e8b
Updated PanicMatches after assertion library updates
...
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
9 years ago
joeybloggs
1fbc384272
Complete test coverage for gecsfield, gtecsfield, ltcsfield and ltecsfield
9 years ago
joeybloggs
327aa2e826
Add gtcsfield, gtecsfield, ltcsfield and ltecsfield
9 years ago
joeybloggs
cd50c5e085
Added necsfield method + tests
9 years ago
joeybloggs
4cbf0659ce
convert isLtField & isLteField to use new functions + test coverage
9 years ago
joeybloggs
5989727cf7
complete test coverage for IsGteField after conversion
9 years ago
joeybloggs
8aea478060
Update isGtField to user new functions
9 years ago