Registry / utility / go-playground-validator

go-playground-validator

JSON →
library9.31.0+incompatiblegogounverified

Package validator implements value validations for structs and individual fields based on tags.

go get github.com/go-playground/validator
INSTALL
IMPORT
SIG · GO-PLAYGROUND-VALI
G
go-playground-validator
utilitygov9.31.0+incompatible
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
github.com/go-playground/validator

Validate a struct's fields using tags.

package main import ( "fmt" "github.com/go-playground/validator" ) type User struct { Name string `validate:"required"` Email string `validate:"required,email"` } func main() { validate := validator.New() user := User{Name: "", Email: "invalid"} err := validate.Struct(user) fmt.Println(err) }
Debug
Known issues
breakingVersion 9 is incompatible with Go modules (uses +incompatible).
fix
Use v10+ with proper module path github.com/go-playground/validator/v10.
affects: 9.x
Upgrade
Version history
9.31.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
go-playground-validator — go get go-playground-validator · libregistry