Validation for a Date field


I want to add a validation on date field in PurchEditLines form, where I’ve set TransDate as systems today’s date using Today() function. Now I want the user to be able to enter the dates in range of +5 days or -5 days from today’s date.

Any other date out of that range should throw me an error.

Got it !

I’ve put the code on validate method of forms datasource field

and used today()+5 or today-5