Commit graph

898 commits

Author SHA1 Message Date
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
Dean Karn
ace513eddd
Update .travis.yml 2020-09-27 11:04:12 -07:00
Dean Karn
0d657b4731
Update .travis.yml 2020-09-27 11:04:00 -07:00
Dean Karn
0e7e593daa
Merge pull request #667 from arkark/fix/endswith-readme
Fix a category of endswith in README
2020-09-27 11:00:56 -07:00
Takeshi Kaneko
f2ce6a4f92 Fix a category of endswith in README 2020-09-17 21:04:54 +09:00
David Ketch
1bf11c9299 Includes Error in FieldError's interface 2020-09-16 15:14:29 -05:00
root
ca0533bb97 Closes #660 readme updates 2020-09-15 19:45:48 +02:00
root
490e253792 Closes #660 added excluded with and without tests 2020-09-15 19:40:20 +02:00
root
742006d126 Closes #660 added excluded with and without 2020-09-15 18:13:38 +02:00
hzw
44a150f359 add required_if and required_unless 2020-09-03 20:34:19 +08:00
nigelis
6f81b7d8d0 Validate tag omitempty, only base on field value 2020-09-01 21:16:32 +08:00
math-nao
7dbe685a02 Update timeZone tag name to timezone 2020-08-02 13:59:46 +02:00
Long Bui
67c4fdf0de Make unique tag work with pointer fields. 2020-07-29 23:07:14 +07:00
Elias Rodrigues
1cbd3081e4 Add function asIntFromType 2020-07-28 11:47:26 -03:00
Elias Rodrigues
33ffa4a31f Move var declarations to the top in test functions 2020-07-26 12:24:53 -03:00