maui-devexpress-dot-maui-dot-dataform-dot-dataformview-1d3a9b2c.md
Gets or sets when to validate values that users enter in the data form’s editors. This is a bindable property.
Namespace : DevExpress.Maui.DataForm
Assembly : DevExpress.Maui.Editors.dll
NuGet Package : DevExpress.Maui.Editors
public CommitMode ValidationMode { get; set; }
| Type | Default | Description |
|---|---|---|
| CommitMode | Manually |
A value that specifies when input values are validated.
|
Available values:
| Name | Description |
|---|---|
| Manually |
A value is validated or committed when the Validate or Commit method is called, respectively.
| | LostFocus |
A value is validated or committed when the editor loses focus.
| | Input |
A value is validated or committed after changes.
|
The ValidationMode property specifies when the data form validates the user input. The following modes are supported:
Note
The form also validates data fields when the Commit() method is called. If values are not valid, they are not committed to the underlying data object.
See the following topic for more information: Validate User Input in Data Form for .NET MAUI.
The example below enables the data form to validate the user input when an editor loses focus.
<dxdf:DataFormView x:Name="dataForm"
ValidationMode="LostFocus">
<!-- ... -->
</dxdf:DataFormView>
See Also