Skip to content

PromptParams.valueValidator method

PromptParams › valueValidator

A function to validate the input value.

Signature:

valueValidator(this: void, value: string): Promisable<MaybeReturn<string>>

Parameters:

ParameterTypeDescription
thisvoid
valuestringThe input value to validate.

Returns: Promisable<MaybeReturn<string>>an error message if the value is invalid, or null if the value is valid.