IsValueValid Method
- Not found
- No package of this release declares this member on this type or on a class it derives from.
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Returns a value indicating whether the value of a specific form field is marked as valid. The corresponding validation is executed by the conditions of a conditional instruction and applied by an Instruction object, that marks the related form field as valid or invalid.
Syntax
No package of this release declares this member. The declaration below is the reference's, and code that uses it does not compile.
public bool IsValueValid(FormField formField);Public Function IsValueValid(ByVal formField As FormField) As BooleanParameters
| Parameter | Description |
|---|---|
| formField | Specifies the |
Return Value
The return value is false, if a conditional instruction is applied that has marked the form field value as invalid. If such conditional instruction was not defined or a conditional instruction has marked the form field value as valid, the method returns true.
Examples
In TX Text Control 34, HasValidValue is the current name of this validation operation. The following example highlights a form field when its conditional rules do not accept the current value.
FormField formField = textControl.FormFields.GetItem();
if (formField != null &&
!textControl.FormFields.ConditionalInstructions.HasValidValue(formField))
{
formField.HighlightMode = HighlightMode.Always;
}Dim formField As FormField = textControl.FormFields.GetItem()
If formField IsNot Nothing AndAlso
Not textControl.FormFields.ConditionalInstructions.HasValidValue(formField) Then
formField.HighlightMode = HighlightMode.Always
End If