Core topic
The entry point, the base type, and what running a schema gives back.
V is where every schema starts — V.string(), V.int(), V.map(),
V.object<T>() — and VType is the base each one extends, carrying the
methods they all share: nullable, defaultValue, refine, preprocess,
transform, add.
Running a schema returns a VResult: a VSuccess with the normalized value,
or a VFailure with a list of VError. Each error carries a code, a
message resolved through the active locale, and a path locating it inside
nested maps, objects and arrays — which is what makes a single result enough to
drive a form, an API response and a log line.
ValidationMode decides how a mask is treated, and VTypeApplyIf conditionally
applies a fragment of the chain without breaking it.
Classes
- V Core
- Entry point for creating validation schemas.
- VCoerce Core
- Provides coercion schemas that convert input values to the target type.
- VError Core
- Represents a single validation error.
-
VFailure<
T> Core - A failed validation result containing the list of errors.
-
VResult<
T> Core - The result of a validation operation.
-
VSuccess<
T> Core - A successful validation result containing the parsed value.
-
VType<
T> Core - Abstract base for all validation types.
Extensions
- VTypeApplyIf on V Core
-
Conditional schema construction. Applies a
buildertransformation to the receiver only whenconditionistrue, returning the receiver unchanged otherwise.
Enums
- RefineStage Core
- Controls when a VMap.refineField, VObject.refineField or VObject.refineFieldRaw callback runs in the container pipeline.
- ValidationMode Core
- Controls which formatted variants a pattern accepts.
Exceptions / Errors
- VAsyncRequiredException Core
-
Thrown by synchronous consumers (
parse,validate,safeParse,errors) when the schema contains async steps (added viarefineAsync). - VException Core
- Exception thrown by VType.parse when validation fails.