Validation

To improve data quality, use REDCap validation rules. For example, you can set minimum and maximum values that help to narrow down the input options. In addition, use rules to ensure that valid dates are entered.

When using the Text Box method of entry, it is best to ensure that the data coming in is the type of data that you are expecting to see. One method of doing this is by employing the Validation option in the field creation screen. By utilising this feature, REDCap will prompt an error when a field’s entry does not meet certain expectations for data type. There are basic data types that you can designate via the Validation option: date (3 formats), datetime (6 formats), e-­mail, integer, letters only, number (5 formats), time (2 formats). These are the most relevant:

  1. Date: The three different formats you can specify for date are Day-­Month-­Year, Month-­Day­‐Year, and Year-­Month-Day. Regardless of which type you choose, a small calendar icon will be visible next to the field in data entry which you can utilise to easily specify a date in the appropriate format. You can also click the “Today” icon to automatically fill in the current date.

  2. Datetime: Datetime can be recorded with or without a “seconds” count. The three without seconds follow the same formats as the three Date formats (listed above), with an additional H:M to indicate time (Hours:Minutes). The three that do include seconds also follow the same three Date formats, with an additional H:M:S to indicate time (Hours:Minutes:Seconds). Like the Date option, a calendar icon appears next to the field, and in addition, a clock icon appears. You can also click the “Now” icon to automatically fill in the current date and time.

  3. E‐mail: To validate an e-mail address entry, REDCap checks for a singular “@” symbol and an appropriate e-­mail domain ending (such as “.com” or “.edu”). The inclusion of other special characters that would not be a part of valid e-­mail addresses (such as “$” or “#”) will also prompt a data validation error. This is very widely applicable, however, if you are expecting e-­mail addresses connected to new or uncommon domains, we do not recommend using this validation option.

  4. Integer: Integers include all of the negative and positive whole numbers, plus zero. This means that any decimal or fractional values will prompt a validation error, as well as any values outside the designated minimum-­maximum range.

  5. Number: This validation type accepts numbers, including decimal values. The five formats are derived from the number of decimal points you choose to allot: 1, 2, 3, 4, or unspecified. If you choose to specify a number of decimal points, an error will be prompted if that exact number of decimal points is not met. For instance, if you have specified two decimal points, an entry of “3” or “3.0” would not be accepted – only “3.00” is considered a valid entry in this case.