Dynamic Validation Builder
Dynamic validation is used to validate a user's input to fields on a form as the user is working with the form. This builder enables incremental client/server validation, using normal Portlet Factory server-side code to validate data as user interacts with the form, immediately showing failures. Any HTML event can be used as the trigger for validation.
Specifying inputs
Input name Description Name Enter a name for this builder call. The designer displays this name in the builder call list. Field Selector Tool We can determine how you want to search the available fields in the data page structure by specifying one of the following options:
- By Name
- Select this to display a list of fields to be modified in the builder call editor. Each row in the table provides a picker that displays each field name in the structure on which the data page operates as the nodes of a tree. We can specify the nodes on which dynamic validation operates by selecting nodes in this tree.
- By Type
- Select this to display a list of field types in the builder call editor. Each row in the table provides a selector that displays a list of field types in the structure on which the data page operates. We can choose a type representing the fields you want.
- Using both techniques
- Select this to display both tables. We can now specify the fields on which this data field modifier operates by both name and/or by type.
Fields Select the form input or inputs to which you want to apply dynamic validation. If a container is chosen, all children will be processed recursively. Trigger Event Select or enter an HTML event handler that runs the validation. The onchange
,onblur
andonkeyup
event handlers are displayed in the selection choice. However, we can type any other valid HTML event handler not shown in the selection. See Event Handlers for a complete list.Mode Select when you want validation will be done for the selected fields.
- Display errors for current input only
- The form renders without displaying any errors, but as a trigger event is launched, any errors for that field are displayed.
- Show errors for the whole form
- The form is initially displayed with all current errors, and validation errors for all selected fields are refreshed as the user interacts with the form. This option is likely to perform more slowly, and some users will find the initial validation errors to be annoying. However, it is useful if the form includes cross-field checks (for example, field A must be greater than field B).