DataFormView.ValidationMode Property
Specifies when to validate values that users enter in the data form’s editors.
Namespace: DevExpress.XamarinForms.DataForm
Assembly: DevExpress.XamarinForms.Editors.dll
NuGet Package: DevExpress.XamarinForms.Editors
Declaration
public CommitMode ValidationMode { get; set; }
Property Value
Type | Description |
---|---|
CommitMode | A value that specifies when input values are validated. |
Remarks
The ValidationMode
property specifies when the data form validates the user input. The following modes are supported:
- LostFocus—the form validates a data field when an editor loses focus.
- PropertyChanged—the form validates a data field when its value changes.
- Manually—the form validates data fields when the Validate() method is called. You can also call the Validate(String) method to validate a specific data field.
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 View for Xamarin.Forms.
Example
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>