The Validation Smart Attribute determines whether or not the input you entered is valid. This determination is performed by matching the user input to the pattern assigned to the field.
When SAPGUI is used, the validation process is normally performed when a page is submitted to the SAP application server. However, individual fields can be validated prior to this step by marking them for validation. Marking a field for validation informs the application that the field should be validated immediately following any pattern-matching. The validation process is usually triggered by a 'done entering text' signal, as defined in the preceding Pattern-Matching section. If a single field is to be validated, the application displays a 'post-validation' screen. This can be either the previous screen with the user input or an entirely different screen. When an entire page is displayed, the post-validation screen does not appear- instead the ensuing screen in the process will display instead.
Any screens that already contain text are assumed by Mobile to be already validated. However, if you alter or modify any input, then the field will be re-validated when the page is submitted for validation.
The validation process is mostly transparent to you. When the 'done entering text' signal is transmitted, the screen will clear and the validation will be performed by the script. You can specify a number of variable actions, such as the following:
- Screen to display when the validation is complete.
- Field to have focus in the post-validation screen.
In addition, you can specify transaction codes, function codes (Fcodes) and internal Fcodes. In the case of Fcodes or internal Fcodes, the script author can identify the Fcodes and perform validation on the input.
Please see the WS Reference Library for more detailed information, including script samples, on using the Validation smart attribute.