Using validation to compare multiple fields

Hi, i am just learning Knack, but I am hitting limitations:
I want to implement a very simple app that stores Start dates and End dates.
All I want to do is compare them and validate that the End date is after the Start date.

When I edit the field, I can add a Validation rule, but no matter what I choose, I can only compare the field value with a hard-coded value and not with another field.
I can also create a Conditional Rule, and there I can compare the two fields and I can match that the end is after the start. However, it only allows me to set the field to a value when this condition is true, but it does not allow me to reject the request if it is not true.

So why can I only compare the dates of two fields in a Conditional rule, but not in a Validation rule?
Is there a technical reason to? If not, is there a workaround other than storing the start and length or not validating in the first place?


Hi @Frederick,

Great questions! There have been a couple of feature requests about validation rules allowing other field values to be used:

These requests have been shared with our product team for consideration.

As far as a workaround to accomplish this, I’m unaware of one that can be done with native Knack features. It’s possible that this could be accomplished with custom code or via an integration. It might be worthwhile to reach out to a Knack expert for help with this setup: Knack Experts Network

However, I’m not sure if this idea would work for your use case, but there is an option in Date/Time fields’ settings to select “Yes, add options like repeat and end-time to use with a calendar” at the bottom. This would allow your app users to utilize one Date/Time field to select start and end dates. See the below gif for more clarity where I highlight how this option works:
date:time field example
(Apologies for the poor video skills :slight_smile: )