The xforms-revalidate event

Release 2.0 - ...

Dispatched in response to: a request to revalidate a particular XForms Model.

Event Properties

Event Properties Value / Description
Target model
Bubbles Yes
Cancelable Yes
Context Info None

An instance node is valid if and only if the following conditions hold:

  • The constraint model item property is true.
  • The value is non-empty if the required model item property is true.
  • The node satisfies all applicable XML schema definitions (including those associated by the type model item property, by an external or an inline schema, or by xsi:type definition on the node itself).

The default action for this event results in the following:

  • All instance data nodes in all instance elements in the model are checked for validity according to the above definition. If the validity of a node changes, then either the xforms-valid event will be marked for dispatch if the node changes from invalid to valid or the xforms-invalid event will be marked for dispatch if the node changes from valid to invalid. Marking one of these events for dispatch unmarks the other.

Note

Since the event sequence for xforms-model-construct excludes xforms-refresh and discards event notification marks, form controls bound to invalid nodes do not receive an initial xforms-invalid event.

Example

XML CopyCode image Copy Code
<xforms:action ev:event="xforms-revalidate">
   <xforms:message level="modal">xforms-revalidate</xforms:message>
</xforms:action>

Specification

Link to the XForms specification: the xforms-revalidate event.