Compare date field columns to restrict difference in days between the two I have an ad space website, where a person can place an advert, but for a maximum of 30 days.

To do this, I have a date field with a calendar popup and collect an end date on field. So it's one field collecting both dates. I need to validate the input of the end date by comparing it to the first field (start date).
I have the field validation module installed, but I'm not sure how to configure it.

How do I configure it? Or is there a better way to do this?
The field validation module does what you want, the interface description can be confusing. 


On your Manage fields screen click the validate action link for your relevant date field.
For your field you want to add a Date range2 validation rule.
Name your rule in Rule name to a memorable description.
For column select value2 to validate your end date.
For Cycle of date select global so you can validate against time relative to the start date.
For Maximum date set it to "+30 day" (or any strtotime() compatible relative string) so that the end date is, at most, 30 days from the start date.
Set your your Custom error message.
Click Save rule.