Commit Graph

7 Commits

Author SHA1 Message Date
田欧
cdd02fa9d6 update error(err) to err (#1416)
the pull request update `return error(err)` to `return err`, and remove `kindOfData`.
2018-07-01 21:10:48 +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
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
田欧
4ad3baf44e Add license for some files (#940) 2017-06-12 01:04:52 -05: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
fecde9fed6 Refactors binding validation 2015-05-31 16:18:50 +02:00