xf:bind
xf:bind/@type
xf:type
xf:bind/@required
xf:required/@value
xf:bind/@constraint
xf:constraint/@value
constraint
attribute on the xf:bind
element. Orbeon Forms extends this to support any number of nested xf:constraint
elements, each specifying a single validation:xf:bind
.level
: optional, specifies an alert level (defaults to error
)constraint
: XPath expression specifying the constraintid
attribute is optional and useful to attach alerts.true()
.xf:constraint/@value
. It is not possible to associate these levels to the required or data type validations: they always use the error level. See also issue #3571​type
and required
attributes, you can use xf:type
and xf:required
elements nested within xf:bind
.id
attribute, so that xf:alert
can refer to those with the validation
attribute:type
and the first required
attribute or element associated with an xf:bind
element are taken into account. On the other hand, all constraint
elements are handled.xf:alert
element. By default, an xf:alert
is considered the default alert for the control and is active for all validation levels and constraints:level
attribute is specified, the alert is active for the given levels:validation
attribute is specified, the alert is active only for the given validations:c1
and c2
refer to id
attributes on xf:constraint
elements. Only xf:constraint
elements associated with a bind pointing to the node to which the control is bound are considered.level
and validation
attributes are equivalent to no attributes.level
and validation
attributes are specified, level
is ignored:xxf:validation-mode
attribute, with the following values:incremental
: upon refresh, update the control's validity information (default)explicit
: upon refresh, don't update the control's validity informationexplicit
mode, the following action allows explicitly updating the validity information on a control or subtree of controls:xxf:validation-mode
set to explicit
control
: space-separated list of controls to updaterecurse
: when set to true
, check all descendant controls of the specified controls as wellxxforms-valid
xxforms-invalid
xforms-revalidate
completes on a given model to all instances that change their validation state (from valid to invalid or from invalid to valid):xxforms-valid
is dispatchedxxforms-invalid
is dispatchedxforms-revalidate
completes, to all instances of the model being revalidated. For a given instance, either xxforms-valid
or xxforms-invalid
is dispatched for a given revalidation.level
: the control's current validation level ("error", "warning", "info", or the empty sequence)constraints
: ids of all current failed constraintserrors
: ids of current failed error constraintswarnings
: ids of current failed warning constraints (empty if current level is "error")infos
: ids of current failed info constraints (empty if current level is "warning" or "error")added-errors
: ids of current errors added since the last refreshremoved-errors
: ids of current errors removed since the last refreshadded-warnings
: ids of current warnings added since the last refreshremoved-warnings
: ids of current warnings removed since the last refreshadded-infos
: ids of current infos added since the last refreshremoved-infos
: ids of current infos removed since the last refreshxxf:valid()
returns the validity of a instance data node or of a subtree of instance data.xxf:invalid-binds()
allows you to determine which bind caused node invalidity.xxf:XML
capitalization is supported and preferred, for consistency with xxf:XPath2ValueTemplate
.false()
and the value is the empty string, then the instance data node is considered valid. This is contrary to XForms 1.1 but follows XForms 2.0.xxf:XPath2
capitalization is supported and preferred, for consistency with xxf:XPath2ValueTemplate
.xxf:validation
, which takes values:lax
(the default)strict
(the root element has to have a definition in the schema and must be valid)skip
(no validation at all for that instance)xs:date
in a schema, an XForms control bound to that node will display a date picker.