PromptValidator<T> Interface

Type Parameters

T

Type the PromptValidator is created for.

public interface PromptValidator<T>

The interface definition for custom prompt validators. Implement this function to add custom validation to a prompt.

Method Summary

Modifier and Type Method and Description
abstract java.util.concurrent.CompletableFuture<java.lang.Boolean> promptValidator(PromptValidatorContext<T> promptContext)

The delegate definition for custom prompt validators.

Method Details

promptValidator

public abstract CompletableFuture promptValidator(PromptValidatorContext promptContext)

The delegate definition for custom prompt validators. Implement this function to add custom validation to a prompt.

Parameters:

promptContext - The prompt validation context.

Returns:

A CompletableFuture of bool representing the asynchronous operation indicating validation success or failure.

Applies to