Documentation
¶
Overview ¶
Package validate provides small, generic request validators for MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmpty = errors.New("empty value")
ErrEmpty is wrapped with the field name when a required value is blank.
View Source
var ErrZero = errors.New("zero value")
ErrZero is wrapped with the field name when a required value is the zero T.
Functions ¶
func RequireNonEmpty ¶
RequireNonEmpty wraps ErrEmpty, naming field, when value is blank (trimmed).
func RequireNonZero ¶
func RequireNonZero[T comparable](field string, value T) error
RequireNonZero wraps ErrZero, naming field, when value is the zero of T.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.