xforms-invalidAdded by IBM on October 10, 2012 | Version 1 (Original)
|Occurs when a data node changes its state from valid to invalid, or when data that is invalid changes value and remains invalid.
Validity is determined based on whether the data matches the data type and constraints specified in the model, as well as the schema validity. Note that the state of "required but empty" is valid.
This event is triggered on the XForms control bound to that node.
Available In xforms:input, xforms:output, xforms:range, xforms:secret, xforms:select, xforms:select1, xforms:submit, xforms:textarea, xforms:trigger, xforms:upload
Example This example shows a label item that displays the total for a purchase order. If the total exceeds 10,000, then the data node becomes invalid and the xforms-invalid event is triggered. In this case, the event triggers an xforms:message action that explains that the total is too high.
The following bind sets the maximum value of the po/total node in the data model to be 10,000:
The following code defines the label that displays the total:
<xforms:bind nodeset="po/total" constraint=". < 10000"/>
level="modal">Total exceeds maximum allowed valued.</xforms:message>
- The order in which user interface events are processed is indeterminate. This means you cannot rely on them processing in a particular order.