XFA Specification
Chapter 9, Automation Objects
Validations
301
Interactive
An interactive XFA application performs the tests in a validation element upon exit from the field or
subform, provided the user has entered a value of the field or subform. The application is not required to
perform the validation tests if the value of the container object is unchanged.
An interactive XFA application also performs the tests in all validation elements when trying to commit the
form. A form is said to be committed when it is in a final state, such as when it is submitted to a server.
Non-Interactive
An XFA application may perform the tests in validation elements after the data binding (merge) operation
completes. This is optional because there is no point to a validation complaining about a field being empty
when the partly-blank form is only going to be printed on paper so that blank fields can be filled in with
pen and ink. The same situation occurs when a partly-blank form is going to be rendered into an
interchange format (such as HTML) to send to a non-XFA client for filling in.
See “Order of Precedence for Automation Objects Activated by the Same Trigger” on page 316.
User Interactions With Validation Tests
Error and Warning Messages
The form designer uses the child
message
element to provide an optional warning message for each type
of validation (null test, format test and script test). The processing application presents the appropriate
message to the user if the value fails any of the validations tests. If no such message is configured for a
particular validation test, the application provides its own. Note that there are attribute values that
suppress the presentation of the warning message.
The name of a
message
element specifies the validation test to which it applies, as shown in the
bold-faced lines in the following example. The example contains a format test that verifies the amount
entered for “Loan amount” is a number between 0 and 999999 and a script test that limits the amount
entered to 1000 if the “Security Risk” box is checked.
Security Risk
Loan amount
Home Index Bookmark Pages
Pages: Home Index All Pages