Simply adds "fox-error" elements inside elements, usually alongside the text node, in the current DOM where validation fails.
The presentation widget showing the item element detects "fox-error" and displays a red "X", next to the element that has caused the error.
Also adds summary information to the Error DOM. Validates only elements that are hit by the match attribute.
The command is 4GL, one fm:validate (with complex XPath) does a lot of iterative checking.
The clear attribute specifies if previous "fox-error" elements are tidied, during validate pass.
The check attribute specifies what XMLSchema facets to check
Setting the error-limit attribute is a safeguard. A very large number of errors would slow down performance. If set, validation stops when this number of errors has been found.
Specify an alternative error summary DOM location.
This clears all errors:
The following checks all errors in the data DOM but stops when 100 errors have been found:
NB: You cannot use fm:validate and match on a root element (such as //* or /* or :{root}). This will throw a null error.
Please use your XX_ORDERMODULE (where XX are your initials) file for the following exercises.
Add an action as a link named “action-show-errors with the prompt “Show Errors”. This should validate everything.
Test this by changing the unit price to have alphabetical characters and running the action.
Add an action as a link named “action-clear-errors with the prompt “Remove Errors”. This should validate remove all errors.