Service Studio 5.1 Help
Validate End-User Typed Values
Service Studio offers automatic input validation of the value typed by the end-user, in Input widgets and Input Password widgets.
Valid and Invalid typed values
The inputs are valid when the following conditions for the widget properties are met:
Variable: The value typed by the end-user must be compliant with the data type of the Variable of the input widget.
Mandatory: The end-user must type a value for the input widget when Mandatory is set to Yes.
The validation of the input widgets affect the Valid runtime property as follows:
True: If the end-user typed value is valid; or if the Validation property of the Button / Link is (none); or if the parent edit record of the input widget is different from the parent edit record of the Button / Link.
False: If the end-user typed value is invalid and the Validation property of the Button / Link is different from (none).
The ValidationMessage runtime property is also used during the validation of the typed values:
If Valid is True, the ValidationMessage is empty.
If Valid is False, ValidationMessage contains a message to be presented to the end-user notifying him/her that validation failed. This message is defined in the default validation messages or, if necessary, you can manually use a more business oriented message.
These two runtime properties together allow you to perform further, more business oriented, validations in the screen actions.
When is validation performed?
Validation is executed when the end-user presses a Button or a Link with Validation set to Client & Server or Server.
If the Button or the Link has a Parent Edit Record, then only the Input Widgets and the Input Password Widgets with the same parent are validated. The rest of the widgets are not evaluated, their Valid runtime property is reset to True and their ValidationMessage is set to empty.
Validation does not apply
to links with the Method property set to
Navigate.
Where is validation performed?
Validation of the data type and optionality are performed as specified in the Validation property:
Client & Server: Validation of the typed values is performed on the client side. If the validation fails, then these values are not submitted to the server, the request is cancelled and the corresponding validation message is displayed.
If the typed values are valid, then the request proceeds and the Valid and ValidationMessage runtime properties of the widgets are updated.
Server: The typed values are submitted to the server and their validation is performed at the server side. The runtime properties of the input widgets are updated and the screen action is executed even if an invalid input exists.
(none): Validation of the typed values is not performed. The Valid runtime property of the input widgets submitted by the Button or Link is reset to True.
See Also
Input Widget Runtime Properties | Input Password Widget Runtime Properties | Button Widget Properties | Link Widget Properties | Default Validation Messages