EditContext.IsValidationFaulted Method

Definition

Overloads

Name Description
IsValidationFaulted()

Returns true if the most recent ValidateAsync(CancellationToken) pass observed an unhandled exception from any OnValidationRequestedAsync handler. A subsequent successful ValidateAsync(CancellationToken) pass clears the flag; a caller-cancelled pass preserves it. Use this to detect that validation itself failed (not just produced validation messages). For per-field validator faults from AddValidationTask(FieldIdentifier, Task, CancellationTokenSource), use the IsValidationFaulted(FieldIdentifier) overload.

IsValidationFaulted(FieldIdentifier)

Returns true if the specified field's last async validation faulted (threw a non-cancellation exception).

IsValidationFaulted<TField>(Expression<Func<TField>>)

Returns true if the field identified by the accessor expression's last async validation faulted (threw a non-cancellation exception).

IsValidationFaulted()

Source:
EditContext.cs

Returns true if the most recent ValidateAsync(CancellationToken) pass observed an unhandled exception from any OnValidationRequestedAsync handler. A subsequent successful ValidateAsync(CancellationToken) pass clears the flag; a caller-cancelled pass preserves it. Use this to detect that validation itself failed (not just produced validation messages). For per-field validator faults from AddValidationTask(FieldIdentifier, Task, CancellationTokenSource), use the IsValidationFaulted(FieldIdentifier) overload.

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

Returns

true if the most recent ValidateAsync(CancellationToken) pass faulted; otherwise false.

Applies to

IsValidationFaulted(FieldIdentifier)

Source:
EditContext.cs

Returns true if the specified field's last async validation faulted (threw a non-cancellation exception).

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

Parameters

fieldIdentifier
FieldIdentifier

Identifies the field to query.

Returns

true if the field's last async validation faulted; otherwise false.

Applies to

IsValidationFaulted<TField>(Expression<Func<TField>>)

Source:
EditContext.cs

Returns true if the field identified by the accessor expression's last async validation faulted (threw a non-cancellation exception).

public bool IsValidationFaulted<TField>(System.Linq.Expressions.Expression<Func<TField>> accessor);
member this.IsValidationFaulted : System.Linq.Expressions.Expression<Func<'Field>> -> bool
Public Function IsValidationFaulted(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 the field's last async validation faulted; otherwise false.

Applies to