Need assistance using edc2go? We are here to help

Validation rules: Date range - define date field


"Date range" is a validation rule that can be set for the date (and time) field.

With the "date range" validation rule, you can:
  • define a field as a 'Date', 'Datetime' or 'Time'
  • allow a date to be in the future (check out this article)
  • specify a minimum and/or maximum value for the field
  • specify a minimum and/or maximum value based on a linked question
  • specify a time window before and after a set range (to allow for a date outside a range to be valid if it lies in the specified time window)
This article will cover the first item: defining a field as 'Date', 'Datetime' or 'Time'.

Front end: date field

If a date field is specified as a Date, Datetime or Time, edc2go will display a message whenever such value is entered that is not in the correct format:

edc2go will only allow entry of:
➙ a date/time entered via the date picker or
➙ a value that is manually entered in the correct format (this is according to the user's preferences for date format)
If a date field is not specified as a Date, Datetime or Time, any type of entry is allowed:


When you create a date field, you can specify in the element settings if you need a Date (1), a Datetime (2) or a Time (3) field.
Within the Validation rules settings of a newly created date field, the box in front of "Date range" is checked by default. This is also indicated by the 'Date range', 'Time range' or 'Datetime range' label behind the field.
If you do not wish to specify this field as Date, Datetime or Time field, meaning you wish to allow for any other types of data entry in this field, you must un-check this box and save this setting.
For this setting, the Date, Datetime or Time field label in the CRF designer will be displayed as "+Validation rule".
Click this label in case you wish to modify the field's validation rules.

Feedback and Knowledge Base