Date range validator

Last updated on
27 November 2026

This documentation needs review. See "Help improve this page" in the sidebar.

The Date range validator in the Drupal Field Validation module (moved into the field_validation_legacy submodule in 3.0.x) checks whether a submitted date or text value falls within an allowed date or time boundary. 

How to Configure It with the Cycle Select Box

  1. Open your validation rule set and add or edit the Date range rule,.

  2. Select the target field and column (for example, the field's value column).

  3. Choose the Cycle from the select list (global, year, month, week, day, hour, or minute).

  4. Update validation conditions as required.
Cycle Expected Format / Input Example Bound Value
global Y-m-d H:i:s or strtotime() strings, relative expressions such as now, +1 day, +1 month, and +1 year 2026-11-27 21:37:00, +1 month
year m-d H:i:s 12-25 00:00:00
month d H:i:s 15 23:59:59
week w H:i:s (0 = Sunday through 6 = Saturday) 1 09:00:00
day H:i:s 17:30:00
hour i:s 15:00
minute s 45

Example: Date in the future: set Cycle to global, set minimum date to +1 day


Date range example: Date in the future (from tomorrow).

Help improve this page

Page status: Needs review

You can: