Commit graph

610 commits

Author SHA1 Message Date
Foolin
83b055d6df add chinese lang 2018-07-06 17:32:31 +08:00
Dean Karn
8ce234ff02
Update README.md 2018-03-19 08:47:08 -07:00
Dean Karn
b226c5e0d7
Merge pull request #350 from afranioce/v9
add brazilian portuguese translations
2018-03-19 08:46:39 -07:00
Afranio Martins
5186bfe8b5 add brazilian portuguese translations 2018-03-08 13:02:55 -03:00
Dean Karn
1b8c8e19cd
Merge pull request #348 from fdelbos/french-translation
add french translations
2018-03-05 07:02:40 -08:00
Frederic Delbos
4dbd40f597 add french translations 2018-03-03 11:57:07 +01:00
Dean Karn
150fe5b6a4
Update README.md 2018-02-20 08:21:16 -08:00
Dean Karn
34ccc97914
Merge pull request #343 from ansel1/oneof
Add oneof validation
2018-02-20 08:20:29 -08:00
Russ Egan
2e9adc3329 swapped mutex for rwmutex
similiar single-goroutine performance, slightly better concurrent performance.
2018-02-19 11:03:16 -06:00
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”)
2018-02-16 11:05:31 -06:00
Dean Karn
535f85221e
Update README.md 2018-02-15 08:51:41 -08:00
Dean Karn
5e036656b8 Add hostname_rfc1123 validation 2018-02-15 08:50:04 -08:00
Dean Karn
3620d3c069 update docs for FieldWithValue=>VarWithValue 2018-02-03 10:35:28 -08:00
Dean Karn
36cd0d5b69
Merge pull request #340 from glb/v9
Support translating field errors when field is of kind reflect.Ptr
2018-02-03 10:28:59 -08:00
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.
2018-02-02 16:39:49 -05:00
Dean Karn
48a433ba4b
Merge pull request #336 from go-playground/correct-var-lock
Correct Var tagCache locking
2018-01-14 14:12:31 -08:00
Dean Karn
e00f5e092a split out to function, defer is needed to handle panics 2018-01-14 14:10:57 -08:00
Dean Karn
b962f3d7d5 Correct Var tagCache locking 2018-01-14 13:58:17 -08:00
Dean Karn
230db62e07
update docs to clarify or vs tag separators (#334) 2018-01-05 19:46:09 -08:00
Dean Karn
b1f51f36f1
Correct consequtive or logic (#330) 2017-12-13 08:54:38 -08:00
Dean Karn
61caf9d303
add map key validation support (#324) 2017-11-12 20:58:10 -08:00
Dean Karn
1304298bf1 Update README.md 2017-10-22 20:06:16 -07:00
Dean Karn
11e5ebe8a1 Merge pull request #317 from go-playground/add-unique
Add unique
2017-10-22 20:05:31 -07:00
Dean Karn
34b84953ff change related software 2017-10-22 19:59:26 -07:00
Dean Karn
11a1fab51d Add unique validation 2017-10-22 17:20:41 -07:00
Dean Karn
946d444376 Add custom validation example 2017-10-02 19:29:20 -07:00
Dean Karn
a021b2ec9a Merge pull request #307 from go-playground/fix_fqdn
Fix fqdn + add isdefault
2017-09-06 20:42:43 -07:00
Dean Karn
f16354ec03 Add isdefault + fix fqdn
Closes #299
Fixes #306
2017-09-06 20:37:05 -07:00
Dean Karn
e3037695c7 Merge pull request #304 from aaronlehmann/doc-fixes
Documentation fixes
2017-08-30 09:14:21 -07:00
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.
2017-08-29 18:50:00 -07:00
Dean Karn
0d09605a05 100% test coverage 2017-08-20 10:02:01 -07:00
Dean Karn
0b5dc7605b Add isdefault validation 2017-08-20 09:53:47 -07:00
Dean Karn
893aecca31 Merge pull request #302 from pigi72333/v9
Fix doc typo
2017-08-20 09:22:08 -07:00
pigi72333
17c6ef0e87 Fix doc typo 2017-08-13 16:13:40 +03:00
Dean Karn
65480b6f6c Merge pull request #301 from lucasmundim/v9
Fix doc typo
2017-08-12 09:49:35 -07:00
Lucas Mundim
8e400db116 Fix doc typo 2017-08-09 19:31:21 -03:00
Dean Karn
5c4193d98e Update README.md 2017-08-06 21:33:52 -07:00
Dean Karn
d529ee1b0f Merge pull request #298 from senuphtyz/v9
Append new validations hostname and fqdn
2017-08-06 21:31:12 -07:00
Bruno Lorenz
dbd50b343f Code hygiene
- Minor performance improve for FQDN validation
- Fix typo in documentation
- Simplified hostname regex
2017-08-05 17:07:23 +02:00
Bruno Lorenz
1669b6e0ee Fixed "Assignment Branch Condition too high" 2017-08-05 09:12:57 +02:00
Bruno Lorenz
08796346a0 Append new validations
- hostname
- fqdn
2017-08-05 09:01:57 +02:00
Dean Karn
44d9acf0a8 Update README.md 2017-07-29 21:01:30 -07:00
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
2017-07-29 20:49:32 -07:00
Dean Karn
fb68f39656 Add Access to Field Name from FieldLevel (#284) 2017-06-11 22:26:53 -07:00
Dean Karn
27158c7a84 Update README.md 2017-04-05 07:15:46 -04:00
Dean Karn
6d8c18553e Merge pull request #278 from flebel/fix_typo
Fix typo
2017-04-05 07:11:23 -04:00
Dean Karn
755afb9dde Update README.md
Adjustments due to GitHub's new markdown parser
2017-03-27 15:13:06 -04:00
Francois Lebel
7a2859f38d Fix typo 2017-03-08 18:59:29 -08:00
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
2017-02-24 12:48:26 -05:00
Dean Karn
b250b44763 Update test & benchmarks
- Updated failing test for new translation error message.
- Updated benchmarks with new machine at the same time.
2017-02-14 02:20:42 -05:00