Registry / utility / go-playground-validator-v8

go-playground-validator-v8

JSON →
library8.18.2gogounverified

Implements value validations for structs and individual fields based on tags.

go get gopkg.in/go-playground/validator.v8
INSTALL
IMPORT
SIG · GO-PLAYGROUND-VALI
G
go-playground-validator-v8
utilitygov8.18.2
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/go-playground/validator.v8

Validates a struct with a required field tag.

package main import ( "fmt" "gopkg.in/go-playground/validator.v8" ) type User struct { Name string `validate:"required"` } func main() { v := validator.NewValidator(nil, nil) err := v.Struct(User{}) fmt.Println(err) }
Debug
Known issues
gotchaVersion 8 is outdated; consider upgrading to v10 for latest features and fixes.
fix
Use gopkg.in/go-playground/validator.v10
affects: >=8.0.0 <9.0.0
Upgrade
Version history
8.18.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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