Top 5.5% forks on proxy.golang.org
proxy.golang.org : github.com/teamwork/validate
Package validate provides simple validation for Go. Basic usage example: All validators treat the input's zero type (empty string, 0, nil, etc.) as valid. Use the Required() validator if you want to make a parameter required. All validators optionally accept a custom message as the last parameter: The error text only includes a simple human description such as "must be set" or "must be a valid email". When adding new validations, make sure that they can be displayed properly when joined with commas. A text such as "Error: this field must be higher than 42" would look weird: You can set your own errors with v.Append(): Some validators return the parsed value, which makes it easier both validate and get a useful value at the same time:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/teamwork/validate
Keywords:
go
License: MIT
Latest release: almost 2 years ago
First release: over 3 years ago
Namespace: github.com/teamwork
Stars: 5 on GitHub
Forks: 3 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 12 days ago