Compare and validate date component #2 is 7 days greater than date component #1?

Created on 26 August 2016, over 8 years ago
Updated 4 June 2024, 7 months ago

This has been added to webform validation Validate greater than or less than other field but I do not understand how you compare and validate 2 date components using the comparison option.

My steps:

I checked Departure date component box (1)
I checked Return date component box (2)

In the comparison operator field which asks to use one of these operators: >, >=, <, <=

To test I just entered < and assumed it would check the date entered for Departure and validate that the Return date was less than the Departure date since it will compare the first component with the second using this operator.

I tested using a Departure date that was after the Return date and the form submitted without error.

What exactly should go in this comparison operator field to compare two date components so that one date is 2 days ahead of the other component?

I reviewed the information here https://www.drupal.org/node/2168813 for regular expressions but still not clear on correct usage in this field. As I understand it's supposed to allow you to validate that a date is greater than another.

Thanks

💬 Support request
Status

Fixed

Version

1.0

Component

Validation rules

Created by

🇺🇸United States lias

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024