Libraries
    Preparing search index...

    Type Alias ObjectSchemaValidationResult<T, TRootSchema, TSchema>

    ObjectSchemaValidationResult: Omit<ValidationResult<T>, "errors"> & {
        errors?: ValidationError[];
        getErrorsFor<TPropertySchema, TParentPropertyDescriptor>(
            selector?: (
                properties: PropertyDescriptorTree<TSchema, TRootSchema>,
            ) => PropertyDescriptor<
                TRootSchema,
                TPropertySchema,
                TParentPropertyDescriptor,
            >,
        ): TPropertySchema extends ObjectSchemaBuilder<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >
            ? PropertyValidationResult<
                TPropertySchema,
                TRootSchema,
                TParentPropertyDescriptor,
            >
            : NestedValidationResult<
                TPropertySchema,
                TRootSchema,
                TParentPropertyDescriptor,
            >;
        getInvalidProperties(): readonly NestedValidationResult<
            any,
            TRootSchema,
            any,
        >[];
    }

    Type Parameters

    Type Declaration

    • Optionalerrors?: ValidationError[]

      A flat list of validation errors.

      Use getErrorsFor() instead for per-property error inspection with type-safe property selectors. The errors array on ObjectSchemaBuilder validation results will be removed in a future major version.

    • getErrorsFor: function
      • Returns a nested validation error for the property selected by the selector function. This is the recommended way to inspect validation errors — it provides type-safe, per-property error details including isValid, errors, and seenValue.

        Prefer this over the deprecated errors array.

        Type Parameters

        • TPropertySchema
        • TParentPropertyDescriptor

        Parameters

        Returns TPropertySchema extends ObjectSchemaBuilder<any, any, any, any, any, any, any>
            ? PropertyValidationResult<
                TPropertySchema,
                TRootSchema,
                TParentPropertyDescriptor,
            >
            : NestedValidationResult<
                TPropertySchema,
                TRootSchema,
                TParentPropertyDescriptor,
            >

    • getInvalidProperties: function