EditContext.Validate Method

Definition

Validates this EditContext.

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

Returns

True if there are no validation messages after validation; otherwise false.

Exceptions

Thrown when an OnValidationRequestedAsync handler does not complete synchronously. Use ValidateAsync(CancellationToken) instead when async validators are registered.

Remarks

Validation must not be re-entered. Do not call Validate() or ValidateAsync(CancellationToken) from inside an OnValidationRequested, OnValidationRequestedAsync, or OnValidationStateChanged handler attached to the same EditContext; doing so produces undefined behavior (in particular, it can cause infinite recursion via the validator's own NotifyValidationStateChanged() calls).

Applies to