type Schema.ParseResult
The result of a schema parse operation.
type ParseResult<T> =
| {
success: true;
data: T;
}
| {
success: false;
error: StringConvertible;
errors?: Record<string, StringConvertible | undefined>;
};
Notes
- Returned by Schema.safeParse.
- If
successistrue, thedataproperty contains the validated data; otherwise,errorcontains the first error message anderrorscontains per-property errors for object schemas.
Related
class Schema
A class that represents a validation schema for input values, objects, and arrays.
