Commit graph

912 commits

Author SHA1 Message Date
Dean Karn
b03f1f453e
update all deps to latest versions (#801) 2021-07-25 21:33:52 -07:00
cokezhang
61a982014e
enhancement: add zh translations for tag alphaunicode,alphanumunicode,containsrune,startswith,endswith (#799) 2021-07-25 21:23:06 -07:00
Oleg Nikachev
44c2696cbd
Minor fixes. (#798)
Fixed README.md. Added missing tags.
Fixed function names in comments in baked_in.go.
Fixed error strings in validator_instance.go (should not be
capitalized).
Fixed twice imported assert package in validator_test.go.
2021-07-25 21:17:49 -07:00
steveorourke
e40bece342
Add support for jwt validation (#783) 2021-07-25 21:10:57 -07:00
Brian Leishman
8cfa1e93b6
Update README.md (#765)
fix https://github.com/go-playground/validator/issues/756

Undoes this pr? https://github.com/go-playground/validator/pull/710

Running `go get github.com/go-playground/validator/v10` definitely seems to be the right command. Go getting without the version pulls 9 or just the master. Also importing without the version does not use the current version (v10 at the time of this pr)

Co-authored-by: Dean Karn <Dean.Karn@gmail.com>
2021-07-25 21:08:41 -07:00
Saed SayedAhmed
f1befad848
Addressing security vulnerabilities (#774)
* Update yaml and x/crypto to fix security vulnerabilities

* run go mod tidy to add missing go.sum entries

Co-authored-by: Dean Karn <Dean.Karn@gmail.com>
2021-07-25 21:04:48 -07:00
Dean Karn
65bb123677
Update README.md 2021-07-07 22:40:03 -07:00
amir
e3e38634b1
Add persian translations (#771) 2021-07-07 22:39:30 -07:00
N/A
af8b8d1c88
Add iso-3166-2 (#788) 2021-07-07 22:33:40 -07:00
Levani
8bfa88a462
Update README.md (#786) 2021-07-07 22:26:48 -07:00
Dean Karn
9104fe2461
Update README.md 2021-07-07 22:21:36 -07:00
masafumi-i
90ab42ba67
fix ja translation (#792) 2021-07-07 22:21:04 -07:00
Alonso Villegas
b1b32b2064
Fix map diving validation (#793) 2021-07-07 22:11:21 -07:00
Dean Karn
76b917f432
Update README.md 2021-05-11 17:37:45 -07:00
Dean Karn
95ac68b6d7
fix url_encoded regex (#769) 2021-05-11 17:37:28 -07:00
Dean Karn
d07eb88fb0
Pr cleanup (#767)
* cleanup after merging PRs

* Add maintainer info +
2021-05-06 07:52:12 -07:00
ѵµσɳɠ
a53d64fc35
Postcode validator for value and field (#759)
* Postcode validator for value and field

* Add translation for postcode rules

Co-authored-by: Dean Karn <Dean.Karn@gmail.com>
2021-05-06 06:52:47 -07:00
Oleksii Kulikov
c2066206fe
Add BIC ISO format validator (#758) 2021-05-06 06:38:34 -07:00
zytell3301
b95d43b789
Add ability to validate map data (#752)
* Implement ValidateMapCtx func for validating map data

* Add ValidateMap func for validating map data with an empty context

* Implement a basic example of ValidateMap method

* Update ValidateMapCtx method, so it can validate nested maps

* Due to changes in ValidateMapCtx, make some updates on ValidateMap method

* Update tests due to changes in ValidateMap method

* Create a basic test for validating nested maps

* Handle error when invalid data is supplied for diving
2021-05-06 06:36:41 -07:00
Zane DeGraffenried
31dd62f1c9
Fix boolean support for required_if, required_unless and eqfield (#754)
* Fix boolean support in requireCheckFieldValue, isEqField and isNeField

* Added tests

Co-authored-by: Zane DeGraffenried <zane.degraffenried@gettyimages.com>
2021-05-06 06:30:06 -07:00
Dean Karn
b926bf0df9
Update README.md 2021-04-06 21:02:04 -07:00
Josh Slate
add373fff7
feat: add bcp 47 language tag validator (#730) 2021-04-06 21:01:39 -07:00
Dean Karn
68248183b4
Update README.md 2021-04-05 18:24:36 -07:00
Deri Herdianto
526b0968b3
Update errors.go (#671) 2021-04-05 18:14:24 -07:00
Sergei Isaev
2b75c46052
version removed from installation and import (#710) 2021-04-05 18:13:46 -07:00
frederikhors
3c8db83c19
New official Documentation URL (#706) 2021-04-05 18:11:57 -07:00
Peperoncino
5b8f3b8a0b
corresponds to boolean value of nefield (#712) 2021-04-05 18:10:38 -07:00
Torwang
882ec0def4
fix StructLevel Parent() (#716)
Co-authored-by: torwang <torwang@tencent.com>
2021-04-05 18:10:13 -07:00
Qalifah
0e674563ff
error in spelling (#732) 2021-04-05 18:06:40 -07:00
Michał Treter
ec1baac93d
Fix accessing fields in composed structs (#733) 2021-04-05 18:06:20 -07:00
João Francisco
514c9dbd77
Fix excludedWithoutAll comment (#673)
Function comment mistakenly referred to a different function
2021-04-05 18:03:36 -07:00
Jake-Convictional
9c415c4565
Add support for excluded_with on pointer fields (#746) 2021-04-05 18:02:20 -07:00
Dean Karn
f6584a41c8
split listing into separate job (#680) 2020-10-17 12:09:18 -07:00
Dean Karn
3bb4866602
Github Actions Changeover (#679) 2020-10-17 11:53:15 -07:00
Dean Karn
456221b630
Fix time.Duration parsing for int param (#678)
This fixes an issue where if the param of a time.Durtion type is specified
as an integer, denoting nanosecond precision, instead of time duration
string the validation would panic.

the fixes ensures it falls back to the previous expected behaviour.
2020-10-17 08:49:42 -07:00
Flávio CF Oliveira
d6b17fd90b
Added Translation for pt (#613)
* Added translations for portuguese [pt]
2020-09-27 15:48:22 -07:00
krhubert
f32fea830e
Add country code validation (#615) 2020-09-27 15:46:23 -07:00
Brandon Lee
704a814277
accept 0x(0X) start in 'hexadecimal' tag (#620)
* accept hexadecimal which starts with 0x(0X) optionally
2020-09-27 12:10:32 -07:00
Elias Rodrigues
4407f4dea0
Add checksum validation for Ethereum address (#630) 2020-09-27 12:04:32 -07:00
Dean Karn
8941cbd00e
Merge pull request #635 from taybart/master
Add e164 to doc.go
2020-09-27 11:52:36 -07:00
Dean Karn
8154ee6ca8
Merge branch 'master' into master 2020-09-27 11:50:24 -07:00
Dean Karn
f0805c61ba
Merge pull request #641 from math-nao/master
Add support for time zone validation
2020-09-27 11:47:15 -07:00
Dean Karn
76981ccf75
Merge pull request #642 from elias19r/issue-584-add-support-for-time-duration-type
Add support for time.Duration type
2020-09-27 11:45:09 -07:00
Dean Karn
57b4fab34b
Merge pull request #644 from longit644/bugfix/make-unique-tag-work-with-pointer-fields
Make unique tag work with pointer fields.
2020-09-27 11:42:30 -07:00
Dean Karn
d9e95d55e9
Update errors.go 2020-09-27 11:35:18 -07:00
Dean Karn
2a5412a1bc
Merge pull request #657 from nigelis/bugfix/omitempty-not-first
Validate tag omitempty, only base on field value
2020-09-27 11:31:16 -07:00
Dean Karn
839d050f74
Merge pull request #658 from hzwwen/master
Add required_if and required_unless
2020-09-27 11:28:50 -07:00
Dean Karn
e6eee3ea88
Merge branch 'master' into master 2020-09-27 11:25:00 -07:00
Dean Karn
b1ccceeb11
Merge pull request #664 from erma07/master
Closes #660 added excluded with and without
2020-09-27 11:16:46 -07:00
Dean Karn
4cd2e40256
Merge pull request #666 from xy-planning-network/patch
Includes Error in FieldError's interface
2020-09-27 11:11:56 -07:00