When validating data in an input form, you may want to execute custom code that can possibly reject the entry until a specific condition is met.
To do so, follow the procedure below:
1- Create a button.
2- In the Variable page of the Object Properties palette, select No Action as the button's action.
3- In the Variable page of the Object Properties palette, click the Keys button and assign the Enter key as a shortcut.
If you do not assign that shortcut, the Enter key will validate the data and bypass the code used with the custom validation button.
4- Create an object method that ensures the condition is met:
The following piece of code is a simple example of what can be done:
: (Form event=On Clicked )