Commit Graph

14 Commits

Author SHA1 Message Date
Alonso Villegas
82bcd6d39b
fix(binding): dereference pointer to struct (#3199) 2024-02-07 19:44:11 +08:00
thinkerou
4b68a5f12a
chore: update go.mod and remove space from copyright (#3158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 10:42:28 +08:00
thinkerou
2bde107686
test support go1.18 (#2990) 2022-03-21 09:43:17 +08:00
Xudong Cai
e90e2ba9b3 upgrade go-validator to v10 (#2149)
* upgrade go-validator to v10

* fix fmt
2019-11-25 14:49:45 +08:00
thinkerou
1acb3fb30a
upgrade validator version to v9 (#1015)
* upgrade validator version to v9

* Update vendor.json

* Update go.mod

* Update go.sum

* fix

* fix

* fix bug

* Update binding_test.go

* Update validate_test.go

* Update go.sum

* Update go.mod

* Update go.sum

* Update go.mod

* Update go.sum
2019-09-05 21:39:56 +08:00
田欧
dfe37ea6f1 unify assert.Equal usage (#1327)
* unify assert.Equal usage

* fix typo
2018-04-20 10:27:44 +08:00
Suhas Karanth
6d913fc343 fix(binding): Expose validator engine used by the default Validator (#1277)
* fix(binding): Expose validator engine used by the default Validator

- Add func ValidatorEngine for returning the underlying validator engine used
  in the default StructValidator implementation.
- Remove the function RegisterValidation from the StructValidator interface
  which made it immpossible to use a StructValidator implementation without the
  validator.v8 library.
- Update and rename test for registering validation
  Test{RegisterValidation => ValidatorEngine}.
- Update readme and example for registering custom validation.
- Add example for registering struct level validation.
- Add documentation for the following binding funcs/types:
  - Binding interface
  - StructValidator interface
  - Validator instance
  - Binding implementations
  - Default func

* fix(binding): Move validator engine getter inside interface

* docs: rm date cmd from custom validation demo
2018-03-29 14:33:07 +08:00
田欧
b7e8a6b9b0 style(import): not use aliase when import package (#1146) 2017-10-29 13:12:22 +01:00
Suhas Karanth
26c3f42095 feat(binding): add support for custom validator / validation tags (#1068)
* feat(binding): Add support for custom validation tags

* docs: Add example for custom validation tag

* test(binding): Add test for registering custom validation
2017-08-27 09:37:39 +02:00
Javier Provecho Fernandez
9e930b9bdd lint code 2016-04-15 01:16:46 +02:00
Manu Mtz.-Almeida
ffb5c0412a Updates Validator + unit tests 2016-01-26 19:28:26 +01:00
Manu Mtz-Almeida
0c9f086b74 Renames Validate() to validate() 2015-05-31 16:30:00 +02:00
Manu Mtz-Almeida
9584e4ea5c Fix for #310 2015-05-29 20:34:41 +02:00
Manu Mtz-Almeida
0a192fb0fa Tons of unit tests 2015-04-09 12:15:02 +02:00