Commit graph

790 commits

Author SHA1 Message Date
Dean Karn
b541462b5a Merge pull request #574 from shenyiling/master
fix: typo
2020-02-09 08:53:58 -08:00
shenyiling
6d2c659585 fix: typo 2020-02-06 18:28:56 +08:00
Dean Karn
fb6c45823a
Update README.md 2019-12-24 21:43:24 -08:00
Dean Karn
5b97da4cbf
Merge pull request #560 from go-playground/cherry-pick-v9
cherry picking v9
2019-12-24 21:41:40 -08:00
Dean Karn
c2546fb355 Add test + docs for FieldLevel.GetTag 2019-12-24 21:16:08 -08:00
richi
f8a081fd83 Added the function GetTag.
The function returns the name of the tag on which the function was called.
2019-12-24 21:15:37 -08:00
Shi Han NG
e73ec5f5ab Update doc for unique=field 2019-12-24 20:28:58 -08:00
Shi Han NG
8f604265e0 Implement unique=FieldName 2019-12-24 20:28:41 -08:00
Jean-Philippe Moal
1effcb06a7 Clarify and complete tag names example 2019-12-24 20:16:53 -08:00
Jean-Philippe Moal
703c0b681a Rework the non standard validators documentation 2019-12-24 20:16:36 -08:00
Taylor
e7c70798c9 Add e.164 support 2019-12-24 20:08:33 -08:00
Dean Karn
a6a294bfeb
Merge pull request #541 from JonathanWThom/jt/space-separated-oneof
Adds ability to validate oneof for space separated strings
2019-12-24 10:54:55 -08:00
Dean Karn
c067a8f197
Merge pull request #539 from sclaire-1/master
Edit CONTRIBUTING.md
2019-12-24 10:38:25 -08:00
Dean Karn
1d93fb999e
Merge pull request #547 from atomicleads/master
Added boolean type support for “eq” validator
2019-12-24 10:37:35 -08:00
Dean Karn
5356060ec3
Merge pull request #548 from JonathanWThom/jt/datauri
Improves accuracy of datauri regex
2019-12-24 10:35:19 -08:00
Dean Karn
361bf41fb9
Merge pull request #550 from Streppel/patch-1
removing unecessary type conversion
2019-12-24 10:32:37 -08:00
Dean Karn
ae15ced5e1
Merge pull request #558 from whatvn/master
error is always nil
2019-12-24 10:31:05 -08:00
Nguyễn Văn Hưng
da6897303a error is always nil 2019-12-18 17:57:44 +07:00
Streppel
0849b1840e
removing unecessary type conversion 2019-11-27 08:47:07 -03:00
Jonathan Thom
bb5fd36827
Improves accuracy of datauri regex
Fixes Or Enhances https://github.com/go-playground/validator/issues/518.

Make sure that you've checked the boxes below before you submit PR:

[x] Tests exist or have been written that cover this particular change.
Change Details:

The datauri validation was not allowing certain valid strings; this
commit updates the regex to meet RFC 2397. I drew heavily on this gist
https://gist.github.com/khanzadimahdi/bab8a3416bdb764b9eda5b38b35735b8,
but had to make a few updates to remove some negative lookaheads (which
Go doesn't allow afaik), and to account for the way the `isDataURI`
function works - it validates the base64 separately from the other parts
of the uri.

@go-playground/admins
2019-11-21 21:26:59 -08:00
Jonathan Thom
685d3e21f3
Makes regex constant & moves single quote replace logic to parseOneOfParam2 2019-11-20 20:04:39 -08:00
Dmitry M. Gavrovsky
d149847e8a test case for “eq” comparing boolean values #547 2019-11-19 21:07:19 +02:00
Dmitry M. Gavrovsky
dfc652373a Added boolean type support for “eq” validator 2019-11-19 21:00:18 +02:00
Dean Karn
691a5f5f25
Update README.md 2019-11-17 13:24:22 -08:00
Dean Karn
bec732e9de
Merge pull request #543 from go-playground/fix-required-without
fix required_*
2019-11-17 13:23:20 -08:00
Dean Karn
a346f2eea4 Merge branch 'master' into fix-required-without 2019-11-17 13:09:46 -08:00
Dean Karn
b11fb5f16e fix typo 2019-11-17 13:09:39 -08:00
Dean Karn
c0f05c7b3d fix required_* 2019-11-17 13:02:10 -08:00
Dean Karn
fe89c745f6
Merge pull request #542 from kaelanfouwels/master
Correction of documentation URL
2019-11-17 13:01:50 -08:00
Kaelan Thijs Fouwels
8678802a39
Correction of documentation URL
see https://github.com/go-playground/validator/issues/536
2019-11-17 19:24:39 +00:00
Jonathan Thom
432c17028a
Adds ability to validate oneof for space separated strings
Fixes Or Enhances https://github.com/go-playground/validator/issues/525.

**Make sure that you've checked the boxes below before you submit PR:**
- [x] Tests exist or have been written that cover this particular change.

Change Details:

* Adds the ability to match on space separated strings when using the
`oneof` validation. Space separted strings must be surrounded by single
quotes to be validated as one string. For example:

```
oneof='Awaiting Verification' 'Verified' 'Failed Verification'
```

passes validation for a field that is exactly `Failed Verification`
(though just `Failed` would...fail).

@go-playground/admins
2019-11-16 23:12:25 -08:00
sclaire-1
4be5d19c39
Edit CONTRIBUTING.md
Added a missing comma
2019-11-16 13:58:37 -08:00
Dean Karn
dbbe6958b3 update doc v9 url to v10 2019-11-11 12:51:46 -08:00
Dean Karn
7e57ca0cf5 convert to go modules 2019-11-11 12:42:35 -08:00
Dean Karn
cd1bd58169
Update README.md 2019-09-29 15:20:42 -07:00
Dean Karn
883a9e06c8
Merge pull request #523 from go-playground/fixes
Fixes
2019-09-29 15:20:00 -07:00
Dean Karn
9593a0f77e add test for new nil validation 2019-09-29 15:03:37 -07:00
Dean Karn
06f92248de linting cleanup 2019-09-29 14:55:11 -07:00
Dean Karn
6484d9f2fb fix required_with_* 2019-09-29 14:12:27 -07:00
Dean Karn
cc25246f01 fix required_without_* 2019-09-29 13:39:27 -07:00
Dean Karn
51fcc303b3
Merge pull request #507 from UgurAsaner/v9
Add Turkish translations
2019-09-29 09:12:55 -07:00
Dean Karn
205b733988
Merge pull request #522 from teejays/v9
Issue #521: Non-standard validators import path fix
2019-09-29 08:59:03 -07:00
Talha Ansari
4e2a13b9bf
Updated tests to reflect the import change 2019-09-29 11:41:10 -04:00
Talha Ansari
2367d307c5
Fix the import path for non-standard validators
Issue [#521](https://github.com/go-playground/validator/issues/521)
2019-09-29 11:29:42 -04:00
baran.asaner
80a8449877 Add Turkish translations 2019-08-23 15:57:00 +03:00
Dean Karn
556b9da3c0
Update README.md 2019-07-12 08:35:03 -07:00
Dean Karn
ab2452c1ce
Merge pull request #489 from tobiassjosten/patch-1
Fixed typo
2019-07-12 08:31:49 -07:00
Dean Karn
d6546ee64a
Merge pull request #484 from leafduo/v9
Make `required_without` work with pointer
2019-07-12 08:31:35 -07:00
Tobias Sjösten
9f6c1cdebf
Fixed typo 2019-07-12 09:22:34 +02:00
Zuyang Kou
54db112759 Make required_without work with pointer
Fix #483, #473
2019-06-14 03:06:35 +08:00