Registry / utility / gookit-validate

gookit-validate

JSON →
library1.6.0gogounverified

Generic Go data validation and filtering library with support for struct tags and custom rules.

go get github.com/gookit/validate
INSTALL
IMPORT
SIG · GOOKIT-VALIDATE
G
gookit-validate
utilitygov1.6.0
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.

validate
github.com/gookit/validate

Validate a map with rules

package main import ( "fmt" "github.com/gookit/validate" ) func main() { v := validate.Map(map[string]interface{}{"name": "Alice", "age": 30}) v.StringRule("name", "required|minLen:2") v.IntRule("age", "required|min:18") if v.Validate() { fmt.Println("Valid!") } else { fmt.Println(v.Errors) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
gookit-validate — go get gookit-validate · libregistry