Specify a Validation Check
A validation check is set by the designer of a form. It instructs VIFRED to evaluate the data entered in the field. If the data passes the validation check, it is accepted; if it does not pass the validation check, VIFRED displays an error message and asks the user to enter the correct data. You cannot specify a validation check for derived fields.
If you leave the validation field empty (the default), no validation is performed.
Note: If you are writing an application that is used with a mouse, keep in mind that users can click randomly around the fields on the form. Set up field validations accordingly.
Validation checks can contain a maximum of 240 characters.
You can specify a validation check in either of these two main styles for any valid data type:
• Comparison operator validation checks
• Comparison to a set of values
To enter or change the validation criteria
Move the cursor to the space beside Validation Check to Perform on Field on the Attribute menu and type the new string over the current one.
This field displays 50 characters at a time, but is scrollable. Use the MoreEdit operation to view or edit the entire validation string.
VIFRED does not check the syntax of a validation check until you attempt to save the form with the VIFRED Save operation. At that time, if VIFRED finds that the validation check you specified is illegal, you must correct it before you can save the form.
Note also that you can use Vision, Applications‑By‑Forms, or an embedded query language to create validations that are more sophisticated than those you can specify with VIFRED.
Last modified date: 04/03/2024