When the user requests to leave a field by, for example, pressing the Next Field key (KEY_TAB by default), a system data validation function is called. The validation function checks the contents of the data field. If it does not satisfy the criteria of the function, the error window is popped up and an error message is displayed. The user is returned to the same field to correct the problem.
You can restrict the range of values that the user is allowed to enter in any numeric, date, time, string, and character field. You can also create and install your own validation function for any field. Your validation function will be called after the system validation function. See Chapter 9, "Data Field Processing Options," and Chapter 32, "Writing User Validation Functions," for more information.