Defines rule-based custom validation on top of all validation enforced through the XML Schema.
xsd:complexType| Name | Description | 
|---|---|
| errorCondition | (Optional element) Defines a custom validation (or error condition) for a specific XML Document Object Model (DOM) node in a form's underlying XML document. | 
The customValidation element is an optional element of the xDocumentClass element.
Note It is possible to create multiple error conditions on a field in a form using multiple errorCondition elements, but they will not appear in the Data Validation dialog box while in design mode.
The following is an example of the customValidation element:
<xsf:customValidation>
   <xsf:errorCondition
      match="/exp:expenseReport"
      expressionContext="exp:reportDate"
      expression="msxsl:string-compare(., ../exp:startDate) < 0 and ../exp:startDate != """
      showErrorOn=".">
      <xsf:errorMessage
         type="modeless"
         shortMessage="The report date occurs before the end of the expense period.">
         The report date occurs before the end of the expense period. Verify that this is correct.
      </xsf:errorMessage> 
   </xsf:errorCondition>
</xsf:customValidation>