Valgo
Type-safe, expressive, and extensible Go validator
with i18n support.
val := v.Is( v.String("Bob", "full_name").Not().Blank().OfLengthBetween(4, 20), v.Number(17, "age").GreaterThan(18),)
if !val.Valid() { out, _ := json.MarshalIndent(val.ToError(), "", " ") fmt.Println(string(out))}{ "age": [ "Age must be greater than \"18\"" ], "full_name": [ "Full name must have a length between \"4\" and \"20\"" ]}Installing
go get github.com/cohesivestack/valgo
Agent skill
npx skills add cohesivestack/valgo –skill valgo