Defining field validationYou can select validation options to ensure that data is entered into a field correctly. When validation options are selected, FileMaker Pro displays a message if you enter data incorrectly. For example, you can set an option to require that users enter a value in a field.Important To avoid confusion when using dates in FileMaker Pro, set field validation options to make sure dates are always entered with four-digit years. For more information on how FileMaker Pro handles dates with two-digit years, see Conversion of dates with two-digit years.
1. Note To set options for fields in Table View, right-click the column heading for the field, choose Field > Field Options from the shortcut menu, then skip to step 8.
2. In the Manage Database dialog box, click the Fields tab.
5. Click Options (or double-click the field name).
6. In the Options for Field dialog box, click the Validation tab.
8. For Validate data in this field, select Always for ongoing field validation, or Only during data entry to limit validation to instances when data is being entered. Check Allow user to override if you want the user to override validation warnings.
Strict data type, then choose Numeric Only from the list Is a date containing numeric values for the month and day, and four digits for the year (for example, 5/12/2014) Strict data type, then choose 4-Digit Year Date from the list Is a time containing numeric values for hours and minutes between 00:00 and 23:59 (seconds are not evaluated for this data type validation) Strict data type, then choose Time of Day from the list Does not duplicate a value found in this field in other records Matches another value in the same field in any other record Member of value list, then choose a value list. (Choose Manage Value Lists to create a list.) Is within a specific range of letters (alphabetically), numbers, dates, or times In range, then type the beginning and ending values Validated by calculation (or click Specify), then enter a calculation. See Defining calculation fields for information about the dialog box. Maximum number of characters, then type the maximum number of characters allowed Does not exceed a specified file size (for container field) Maximum number of kilobytes, then enter the number of kilobytes. This setting limits the size of a file that’s embedded in a container field or stored externally. This setting has no effect on files that are stored by reference in a container field.
9. To display a custom message if validation fails, select Display custom message if validation fails. Type a message (up to 255 characters).
10. Click OK to close the Options for Field dialog box, or click another tab to set additional field options.
• Field and validation values must be identical to successfully validate the contents of a field. If the Validation by calculation option is used, the calculation results must exactly match the contents of the field being evaluated. By default, the FileMaker Pro calculation engine calculates to 16 digits of precision to the right of the decimal. If you are validating fields by calculation that return fractional results, you can use the Round function to limit calculation results to an expected number of digits.
• You can also specify the auto-complete option for text fields to help ensure accuracy for data entry. For more information, see Setting up a field to auto-complete during data entry.
•
• You can set auto-enter and validation options for external fields for ODBC tables. These field options only affect how you work with these external fields in FileMaker Pro. The options are independent of any options that might be set in the ODBC data source.