Hi everyone!
I need to prevent users from submitting a form (SharePointIntegration) where the "End Date" (DataCardValue7) is earlier than the "Start Date" (DataCardValue6). Both are date pickers.

Currently, I've added the following expression to the "OnChange" property of DataCardValue7:
If (
DataCardValue7.SelectedDate < DataCardValue6.SelectedDate,
Set(varError, "The end date cannot be earlier than the start date.");
Notify(
varError,
NotificationType.Error,
5000
),
DataCardValue7.SelectedDate >= DataCardValue6.SelectedDate,
Set(varError,"")
)
The issue is that users can still submit the form because it doesn't have an "OnSave" property where I can add code to control submission based on date errors. What can I do to prevent form submission with invalid dates?
Thank you in advance for any help you can provide.