Skip to content
Simple validation
Go
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead, 2 commits behind Teamwork:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.codecov.yaml
.travis.yml
LICENSE
README.md
go.mod
go.sum
messages.go
zvalidate.go
zvalidate_test.go

README.md

Build Status codecov GoDoc

Validation for Go.

Basic usage example:

v := zvalidate.New()
v.Required("firstName", customer.FirstName)
if v.HasErrors() {
	fmt.Println("Had the following validation errors:")
	for key, errors := range v.Errors {
		fmt.Printf("    %s: %s", key, strings.Join(errors))
	}
}

When possible validators parse the value and return the result; e.g. Email() returns mail.Address.

See godoc for more info.

You can’t perform that action at this time.