Share via


IFieldPrompt<T>.ValidateAsync(T, Object) Method

Definition

Validate value to be set on state and return feedback if not valid.

public System.Threading.Tasks.Task<Microsoft.Bot.Builder.FormFlow.ValidateResult> ValidateAsync (T state, object value);
abstract member ValidateAsync : 'T * obj -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.FormFlow.ValidateResult>
Public Function ValidateAsync (state As T, value As Object) As Task(Of ValidateResult)

Parameters

state
T

State before setting value.

value
Object

Value to be set in field.

Returns

Result including feedback and if valid.

Remarks

One way to control this is to supply a ValidateAsyncDelegate<T> to the Field(IField<T>) or Confirm(String, ActiveDelegate<T>, IEnumerable<String>) steps.

Applies to