Skip to content
Node: zod, joigithub.com/sahilkhaire/gox/validate

Field

Overview

Field validates a single value in a programmatic schema.

Part of the validate package — Node.js analog: zod, joi.

Field is a type exported by gox. Methods on this type are documented separately.

Signature

go
type Field interface {
	// contains filtered or unexported methods
}

Compare: Node.js · Standard Go · gox

js
// Typical zod, joi pattern in Node.js
go
// use github.com/go-playground/validator struct tags or manual checks
go
import "github.com/sahilkhaire/gox/validate"

var field validate.Field = validate.String().Email()

Example

go
import "github.com/sahilkhaire/gox/validate"

var field validate.Field = validate.String().Email()

Tips

Browse methods on this type in the sidebar for handler-style APIs and options structs.

Standard library alternative

gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.

Back to validate package overview

MIT Licensed · Built for Node.js developers moving to Go