Merge pull request #21 from chrisscott/v4-development

Update docs with correct code to instantiate a new validator.
pull/22/head
Dean Karn 10 years ago
commit c35b32d4bc
  1. 2
      doc.go

@ -5,7 +5,7 @@ Built In Validator
v3 no longer contains a built in Validator instance. v3 no longer contains a built in Validator instance.
myValidator = validator.New("validate", validator.BakedInFunctions) myValidator = validator.NewValidator("validate", validator.BakedInValidators)
errs := myValidator.ValidateStruct(//your struct) errs := myValidator.ValidateStruct(//your struct)
valErr := myValidator.ValidateFieldByTag(field, "omitempty,min=1,max=10") valErr := myValidator.ValidateFieldByTag(field, "omitempty,min=1,max=10")

Loading…
Cancel
Save