Commit graph

14 commits

Author SHA1 Message Date
Pantelis Sampaziotis
912fcd16a8 resovle conflict 2020-02-09 19:30:16 +02:00
Pantelis Sampaziotis
14f963703b Add datetime validation 2020-02-09 19:28:20 +02:00
Dean Karn
0c80f876cd Merge branch 'master' into json 2020-02-09 09:11:31 -08:00
Pantelis Sampaziotis
5b51bff4e6 Add isLowercase and isUppercase valitation 2020-02-05 22:39:47 +02:00
Pantelis Sampaziotis
581d2698d5 Added isJSON validation 2020-02-04 18:04:58 +02:00
Taylor
e7c70798c9 Add e.164 support 2019-12-24 20:08:33 -08:00
Dean Karn
7e57ca0cf5 convert to go modules 2019-11-11 12:42:35 -08:00
Sam Wang
df107f0184 Add English translation for "unique" validation. 2018-11-14 21:33:36 +00:00
Dean Karn
54da7fa48f fix linting and spelling errors 2018-05-05 09:23:38 -07: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
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
Jawher Moussa
73e8e76de2 Fix universal translator imports so that goimports doesn't get remove them
Running goimports on the codebase deletes all the imports of "github.com/go-playground/universal-translator".

The fix consists of explicitly qualifying the import statements with ut.
2016-09-22 13:29:12 +02:00
Dean Karn
cddc415625 perf enhancements + corrected issue with or's
- or's weren't reporting the param back in the tag, long standing but noticed issue.
- added validation check for or's when more validations exist after the or.
2016-09-19 11:28:38 -04:00
Dean Karn
a7ca4a1d32 add default translations for "en"
- need help creating more.
2016-09-15 14:50:04 -04:00