Documentation - v1.2.0-alpha.3
    Preparing search index...
    PromptValidator: (prompt: PromptValidatorContext<T>) => Promise<boolean>

    Function signature for providing a custom prompt validator.

    Type Parameters

    • T

      Type of recognizer result being validated.

    Type Declaration

    The validator should be an asynchronous function that returns true if prompt.recognized.value is valid and the prompt should end.

    Note

    If the validator returns false the prompts default re-prompt logic will be run unless the validator sends a custom re-prompt to the user using prompt.context.sendActivity(). In that case the prompts default re-prompt logic will not be run.

    type PromptValidator<T> = (prompt: PromptValidatorContext<T>) => Promise<boolean>;