package validate¶
Package validate provides standard Validator constructors for cfg configuration fields. Each constructor returns a cfg.Validator whose Describe reports its kind and parameters so the schema commands and editor tooling can render the constraint declaratively rather than as an opaque function.
Functions¶
func All¶
All returns a validator that runs each child in order. The first failure stops the chain.
func Func¶
Func returns a validator backed by an arbitrary Go function. The description tells operators and editor tooling what the function checks, since the function body itself is opaque to introspection.
func Pattern¶
Pattern returns a validator that requires a string value to match a regular expression. The pattern compiles at construction; a malformed pattern panics.
func Range¶
Range returns a validator that requires an integer value to fall within [min, max] inclusive.