EditContext.Validate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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).