Can you use server side validation to ensure one date/time is greater than another?

Hi All,

Just like the title suggests, I can’t seem to find a way to use server side validation to ensure an ‘end time’ is greater than or in the future compared to a ‘start time’

Naturally i can use front end dynamic mins and maxs, to limit the input, but that isn’t the same as validation.

None of the options i’ve tried in Server Connect seem to work.

Any ideas?

Hi.
Thinking something like:
Set value (datatype date) -> starttime
Condition: “$_POST.endtime (type date) > starttime”
-> Then set your step
-> Else nothing

Yes, i guess using a simple condition step would fix it. I was hoping to be able to use the Validator as i already have many nested IF statements :slight_smile:

But that might be the easiest solution. Thanks

@George validators should be another extensible functionality in SC.

If anyone sees this or wants to offer e better way of doing it I was able to achieve what i wanted by:

  • using a Condition
  • setting a numerical value in the ELSE statement
  • using that value and the MAX validation rule to be able to display the validation message on the user input

Like this:

It does the job, but happy to know if there are better ways