Update non standard validation docs.

pull/421/head
Andrei Avram 6 years ago
parent 1d286c8332
commit f2ac4efd57
  1. 5
      doc.go
  2. 3
      non-standard/validators/notblank.go

@ -993,6 +993,11 @@ that should not make it to production.
Non standard validators
A collection of validation rules that are frequently needed but are more
complex than the ones found in the baked in validators.
A non standard validator must be registered manually using any tag you like.
See below examples of registration and use.
type Test struct {
TestField string `validate:"yourtag"`
}

@ -7,7 +7,8 @@ import (
"github.com/andreiavrammsd/validator"
)
// NotBlank is the validation function for validating if the current field has a value or length greater than zero.
// NotBlank is the validation function for validating if the current field
// has a value or length greater than zero, or is not a space only string.
func NotBlank(fl validator.FieldLevel) bool {
field := fl.Field()

Loading…
Cancel
Save