AutomationPeer.IsDataValidForForm Method

Definition

Gets a Boolean value that indicates whether the entered or selected value is valid for the form rule associated with the automation element.

public:
 virtual bool IsDataValidForForm() = IsDataValidForForm;
bool IsDataValidForForm();
public bool IsDataValidForForm();
function isDataValidForForm()
Public Function IsDataValidForForm () As Boolean

Returns

Boolean

bool

A Boolean value that indicates whether the entered or selected value is valid for the form rule associated with the automation element. The default return value is true.

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

As an example, if the user entered "425-555-5555" for a zip code field that requires 5 or 9 digits, the IsDataValidForForm property can be set to false to indicate that the data is not valid.

Applies to