Skip to main content

BaseEdit.Validate Event

Enables you to validate the editor’s value.

Namespace: DevExpress.UI.Xaml.Editors

Assembly: DevExpress.UI.Xaml.Editors.v21.2.dll

NuGet Package: DevExpress.Uwp.Controls

Declaration

public event ValidateEventHandler Validate

Event Data

The Validate event's data class is ValidationEventArgs. The following properties provide information specific to this event:

Property Description
ErrorContent Gets or sets an object that describes the validation error.
ErrorType Gets or sets the error type.
IsValid Gets or sets a value specifying whether the value is valid.
UpdateSource Gets the action that caused the validation.
Value Gets the editor’s value.

The event data class exposes the following methods:

Method Description
SetError(Object, ErrorType) Displays an error within the editor.
SetError(Object) Displays an error within the editor.

Remarks

Handle the Validate event to manually validate the editor (e.g. to limit the range of valid values, implement a custom conditional validation mechanism, etc).

To specify when the editor should automatically validate its value, use the BaseEdit.ValidateOnEnterKeyPressed and BaseEdit.ValidateOnTextInput properties. To manually force the editor’s validation, call the BaseEdit.DoValidate method.

Note

The Validate event is not raised if the editor’s BaseEdit.CausesValidation property is set to false.

See Also