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
535f85221e
Update README.md
7 years ago
Dean Karn
5e036656b8
Add hostname_rfc1123 validation
7 years ago
Dean Karn
3620d3c069
update docs for FieldWithValue=>VarWithValue
7 years ago
Dean Karn
36cd0d5b69
Merge pull request #340 from glb/v9
...
Support translating field errors when field is of kind reflect.Ptr
7 years ago
Geoff Baskwill
866bd2a946
Support translating field errors when field is of kind reflect.Ptr
...
Previously, if fields were of kind `reflect.Ptr`, the translation of
validation errors used the default string, resulting in unexpected
output.
Now the default translations use the field's `Elem()` kind (for example
for `*string` the `Elem()` is `string`), resulting in much more natural
output.
7 years ago
Dean Karn
48a433ba4b
Merge pull request #336 from go-playground/correct-var-lock
...
Correct Var tagCache locking
7 years ago
Dean Karn
e00f5e092a
split out to function, defer is needed to handle panics
7 years ago
Dean Karn
b962f3d7d5
Correct Var tagCache locking
7 years ago
Dean Karn
230db62e07
update docs to clarify or vs tag separators ( #334 )
7 years ago
Dean Karn
b1f51f36f1
Correct consequtive or logic ( #330 )
7 years ago
Dean Karn
61caf9d303
add map key validation support ( #324 )
7 years ago
Dean Karn
1304298bf1
Update README.md
7 years ago
Dean Karn
11e5ebe8a1
Merge pull request #317 from go-playground/add-unique
...
Add unique
7 years ago
Dean Karn
34b84953ff
change related software
7 years ago
Dean Karn
11a1fab51d
Add unique validation
7 years ago
Dean Karn
946d444376
Add custom validation example
7 years ago
Dean Karn
a021b2ec9a
Merge pull request #307 from go-playground/fix_fqdn
...
Fix fqdn + add isdefault
7 years ago
Dean Karn
f16354ec03
Add isdefault + fix fqdn
...
Closes #299
Fixes #306
7 years ago
Dean Karn
e3037695c7
Merge pull request #304 from aaronlehmann/doc-fixes
...
Documentation fixes
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
0d09605a05
100% test coverage
7 years ago
Dean Karn
0b5dc7605b
Add isdefault validation
7 years ago
Dean Karn
893aecca31
Merge pull request #302 from pigi72333/v9
...
Fix doc typo
7 years ago
pigi72333
17c6ef0e87
Fix doc typo
7 years ago
Dean Karn
65480b6f6c
Merge pull request #301 from lucasmundim/v9
...
Fix doc typo
7 years ago
Lucas Mundim
8e400db116
Fix doc typo
7 years ago
Dean Karn
5c4193d98e
Update README.md
7 years ago
Dean Karn
d529ee1b0f
Merge pull request #298 from senuphtyz/v9
...
Append new validations hostname and fqdn
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
44d9acf0a8
Update README.md
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
fb68f39656
Add Access to Field Name from FieldLevel ( #284 )
7 years ago
Dean Karn
27158c7a84
Update README.md
8 years ago
Dean Karn
6d8c18553e
Merge pull request #278 from flebel/fix_typo
...
Fix typo
8 years ago
Dean Karn
755afb9dde
Update README.md
...
Adjustments due to GitHub's new markdown parser
8 years ago
Francois Lebel
7a2859f38d
Fix typo
8 years ago
Dean Karn
4bd1935852
Updated README
...
- Corrected some typos in README which Fixes #273
- Updated Benchmarks for Go 1.8
- updated lint issue in one of the tests
8 years ago
Dean Karn
b250b44763
Update test & benchmarks
...
- Updated failing test for new translation error message.
- Updated benchmarks with new machine at the same time.
8 years ago
Dean Karn
691ea55063
Update README.md
8 years ago
Dean Karn
0cc1e78abb
Merge pull request #271 from ellisonleao/patch-1
...
fix small doc typo
8 years ago
Ellison Leão
7cd869b083
fix small doc typo
8 years ago
Dean Karn
fb258d3590
Merge pull request #267 from osamingo/osamingo-patch-1
...
Fix usage of printable ascii
8 years ago
Osamu TONOMORI
cf230a98d7
Fix usage of printable ascii
8 years ago
Dean Karn
077c3830f3
Correct Namespace when array or map of structs
...
namespace was incorrect when array or map of structs, see #266
8 years ago
Dean Karn
49fccadad1
correct structonly functionality
...
- structonly wasn’t behaving correctly when not used with an accompanying struct validation.
8 years ago
Dean Karn
941ce2cabc
Merge pull request #262 from go-playground/unicode-alphas
...
Add alphaunicode & aplhanumericunicode
8 years ago