An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/marksalpeter/validator

Package validator validates the fields of structs by applying the rules embeded in a fields "validate" tag to the value of that field. It is designed to return plain english error messages that refer to field names by their json key. These validation error messages are intended to be presented to the outside world. Rules can be joined together with "and"s (&) and "or"s (|) Comma seperated params can also be passed to a rule, but not every rule has parameters. Check the godoc of the spefic rule you're applying for an example of how to use it. Finally, its worth noting the validators can cross reference other fields.

Ecosystem
proxy.golang.org
Latest Release
v0.1.2
about 4 years ago
Versions
3
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/marksalpeter/validator
spec
License MIT
Namespace github.com/marksalpeter
First Release over 5 years ago
Last Synced 17 days ago
Repository
Stars 6 on GitHub
Forks 0 on GitHub
Rankings on proxy.golang.org
Overall Top 8.2%