
i want enter the data on a time sheet in date field.
My condition
The user able select only today and past day.If user is try yo select daybefore yesterday or more it has to through the message
2 respostas
Since you only want to allow today's and yesterday's date, you can use the following rule:
OR(
DateField__c > TODAY(),
DateField__c, <= (TODAY() -2))
I'm not sure if you really want it in validation rule because you won't be able to edit the same record anymore in the future unless you satisfy the new requirement.