Registry / utility / validator-v2

validator-v2

JSON →
library2.0.1gogounverified

Package validator implements value validations based on struct tags, allowing declarative validation rules.

go get gopkg.in/validator.v2
INSTALL
IMPORT
SIG · VALIDATOR-V2
V
validator-v2
utilitygov2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

validator
gopkg.in/validator.v2

Validate a struct using tags.

package main import ( "fmt" "gopkg.in/validator.v2" ) type User struct { Name string `validate:"min=3,max=20"` Age int `validate:"min=18"` } func main() { u := User{Name: "Jo", Age: 15} err := validator.Validate(u) fmt.Println(err) }
Debug
Known issues
breakingVersion v2 is outdated; consider using github.com/go-playground/validator/v10 for more features and active maintenance.
fix
Migrate to github.com/go-playground/validator/v10.
affects: >=0.0.0
Upgrade
Version history
2.0.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
validator-v2 — go get validator-v2 · libregistry