Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DataFormView.Validate(String) Method

Validates the specified data field according to the current validation logic.

Namespace: DevExpress.Maui.DataForm

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

#Declaration

C#
public bool Validate(
    string propertyName
)

#Parameters

Name Type Description
propertyName String

A value that specifies a data field name.

#Returns

Type Description
Boolean

true if the data field value is valid; otherwise, false.

#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.
  • Input—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 for .NET MAUI.

See Also