Adding Client-side Validation
Â
Sample code:
Display file source:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â PUISAMPLES/QDDSSRC(CUSTINQ2D)
RPGLE source:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â PUISAMPLES/QRPGLESRC(CUSTINQ2R)
Client-side validation allows you to add simple validation, such as value lists, ranges, and comparisons, on top of the standard data type validation that Profound UI automatically enforces when input components are used.
For example, in the customer inquiry example above, client-side validation can be used to make the customer number a required field without additional RPG code. This is done by selecting the customer number textbox in the designer, scrolling to the validation section in the Properties Window, and setting the required property to true.
Â
Now, the user must enter a value for the customer number. Otherwise, the customer number field is highlighted, and a validation tooltip appears.
Â