EditContext.IsValidationPending Method

Definition

Overloads

Name Description
IsValidationPending(FieldIdentifier)

Returns true if the specified field has a pending async validation task. A task is "pending" until the framework's observer has settled its outcome and cleared the slot (i.e., not only until the task itself completes) so a consumer that waits for IsValidationPending(FieldIdentifier) to become false is guaranteed to also see the final IsValidationFaulted(FieldIdentifier) value.

IsValidationPending()

Returns true if a form-level ValidateAsync(CancellationToken) pass is currently in flight. Suitable for driving form-wide UI such as disabling a submit button or showing a "validating..." indicator for the current submission. Does not consider field-level pending tasks (those are superseded when the next form-level pass starts); use the IsValidationPending(FieldIdentifier) overload for per-field state.

IsValidationPending<TField>(Expression<Func<TField>>)

Returns true if the field identified by the accessor expression has a pending async validation task.

IsValidationPending(FieldIdentifier)

Source:
EditContext.cs

Returns true if the specified field has a pending async validation task. A task is "pending" until the framework's observer has settled its outcome and cleared the slot (i.e., not only until the task itself completes) so a consumer that waits for IsValidationPending(FieldIdentifier) to become false is guaranteed to also see the final IsValidationFaulted(FieldIdentifier) value.

public bool IsValidationPending(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier);
member this.IsValidationPending : FieldIdentifier -> bool
Public Function IsValidationPending (ByRef fieldIdentifier As FieldIdentifier) As Boolean

Parameters

fieldIdentifier
FieldIdentifier

Identifies the field to query.

Returns

true if async validation is in progress for the field; otherwise false.

Applies to

IsValidationPending()

Source:
EditContext.cs

Returns true if a form-level ValidateAsync(CancellationToken) pass is currently in flight. Suitable for driving form-wide UI such as disabling a submit button or showing a "validating..." indicator for the current submission. Does not consider field-level pending tasks (those are superseded when the next form-level pass starts); use the IsValidationPending(FieldIdentifier) overload for per-field state.

public bool IsValidationPending();
member this.IsValidationPending : unit -> bool
Public Function IsValidationPending () As Boolean

Returns

true if a form-level validation pass is in progress; otherwise false.

Applies to

IsValidationPending<TField>(Expression<Func<TField>>)

Source:
EditContext.cs

Returns true if the field identified by the accessor expression has a pending async validation task.

public bool IsValidationPending<TField>(System.Linq.Expressions.Expression<Func<TField>> accessor);
member this.IsValidationPending : System.Linq.Expressions.Expression<Func<'Field>> -> bool
Public Function IsValidationPending(Of TField) (accessor As Expression(Of Func(Of TField))) As Boolean

Type Parameters

TField

The type of the field.

Parameters

accessor
Expression<Func<TField>>

An expression that identifies the field, e.g. () => model.Email.

Returns

true if async validation is in progress for the field; otherwise false.

Applies to