Versions in this module Expand all Collapse all v1 v1.0.1 Oct 2, 2026 Changes in this version + var ErrNilValue = newCheckError("NotNil", "", "value is nil") v1.0.0 Oct 2, 2026 Changes in this version + var ErrEmptyValue = newCheckError("NonEmpty", "", "value is empty") + var ErrMultipleSchemasMatch = errors.New("value matches multiple schemas") + var ErrNonEmptyValue = newCheckError("Empty", "", "value is not empty") + var PrintableLine = Format("PrintableLine", isPrintableLine) + var PrintableText = Format("PrintableText", isPrintableText) + func CanCheckEarly(t reflect.Type) bool + func RenderPath(path []PathElement) string + func Validate(value any, validate BoundSchema) error + type BoundSchema func(v reflect.Value) error + func Empty(t reflect.Type) BoundSchema + func NonEmpty(t reflect.Type) BoundSchema + func (v BoundSchema) Check(val any) error + type CheckError struct + CheckName string + Msg string + Param string + func (err *CheckError) Error() string + type CompoundCheckError struct + Cause error + CheckName string + DataItem PathElement + Param string + func (err *CompoundCheckError) DataPath() []PathElement + func (err *CompoundCheckError) Error() string + func (err *CompoundCheckError) SchemaPath() []string + func (err *CompoundCheckError) Unwrap() error + type PathElement struct + Index int + Kind PathElementKind + Name string + func (p PathElement) String() string + type PathElementKind int + const FieldElement + const IndexElement + const KeyElement + const NoElement + type Schema func(t reflect.Type) BoundSchema + func AllOf(schema ...Schema) Schema + func AnyOf(schema ...Schema) Schema + func BindCompound(check func(t reflect.Type) error, early func(t reflect.Type) BoundSchema, ...) Schema + func BindTypeCheck(check func(t reflect.Type) error, validate BoundSchema) Schema + func Format(name string, isValid func(str string) bool) Schema + func Ge(x any) Schema + func Gt(x any) Schema + func In(allowed ...any) Schema + func Item(schema Schema) Schema + func Le(x any) Schema + func Len(schema Schema) Schema + func Lt(x any) Schema + func OneOf(schema ...Schema) Schema + func RegexpFormat(pattern string) Schema + func Structure(ptr any, opts ...StructOption) Schema + func (schema Schema) BindAny() BoundSchema + func (schema Schema) BindTypeOf(v any) BoundSchema + type StructOption func(*structureValidator) + func AllowUncheckedFields(fieldPtrs ...any) StructOption + func Field(fieldPtr any, schema Schema) StructOption + type UnknownValueError struct + KnownValues []any