Libraries
    Preparing search index...

    Type Alias ValidationError

    Represents a single validation error with a human-readable error message.

    When returned from an object-level validator (via addValidator), the optional property selector can route the error to a specific property so that ObjectSchemaValidationResult.getErrorsFor | getErrorsFor() reports it on that property rather than only on the root object.

    .addValidator((v) => ({
    valid: false,
    errors: [{
    message: 'Passwords do not match',
    property: (t) => t.confirmPassword
    }]
    }))
    type ValidationError = {
        message: string;
        property?: (tree: any) => any;
    }
    Index

    Properties

    Properties

    message: string
    property?: (tree: any) => any

    Optional property selector that targets this error to a specific property of the validated object. Uses the same selector signature as getErrorsFor() and react-form's forProperty.