Update docs with correct code to instantiate a new validator.

pull/21/head
Chris Scott 10 years ago
parent 37ced95e7a
commit 0d078a658d
  1. 2
      doc.go

@ -5,7 +5,7 @@ Built In Validator
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)
valErr := myValidator.ValidateFieldByTag(field, "omitempty,min=1,max=10")

Loading…
Cancel
Save