Documentation - v1.2.0-alpha.3
    Preparing search index...

    Contextual information passed to a custom PromptValidator.

    interface PromptValidatorContext<T> {
        attemptCount: number;
        context: TurnContext;
        options: PromptOptions;
        recognized: PromptRecognizerResult<T>;
        state: object;
    }

    Type Parameters

    • T

      Type of recognizer result being validated.

    Index

    Properties

    attemptCount: number

    A count of the number of times the prompt has been executed.

    A number indicating how many times the prompt was invoked (starting at 1 for the first time it was invoked).

    context: TurnContext

    The context for the current turn of conversation with the user.

    The validator can use this to re-prompt the user.

    options: PromptOptions

    Original set of options passed to the prompt by the calling dialog.

    The validator can extend this interface to support additional prompt options.

    Result returned from the prompts recognizer function.

    The recognized.succeeded field can be checked to determine of the recognizer found anything and then the value can be retrieved from recognized.value.

    state: object

    A dictionary of values persisted for each conversational turn while the prompt is active.

    The validator can use this to persist things like turn counts or other state information.