TreeValidationResult
Type Alias
The result of running a tree validation function.
API
type TreeValidationResult<E extends ValidationError = ValidationError> = | ValidationSuccess | OneOrMany<WithOptionalField<E>>
Description
The result of running a tree validation function.
The result may be one of the following:
- A
ValidationSuccess
to indicate no errors. - A
ValidationError
without a field to indicate an error on the field being validated. - A
ValidationError
with a field to indicate an error on the target field. - A list of
ValidationError
with or without fields to indicate multiple errors.
Jump to details