Is it possible to use the date and time validation to make sure the date being entered is earlier then the current date? This way users can only enter past dates?
Hi Lawrence,
What version of Kentico are you using? Is it Portal Engine or MVC? Is it a frontend form via Form Builder or you need to restrict this in Kentico admin for page type field, for example?
kentico 11 in portal mode. In the formbuilder for a front end form. I see I can set validation on the field but it makes me specify a date, I was wondering if there was a custom validation I could add that would do the trick.
That should be fairly simple, use the following General condition (from the validation rules type dropdown):
Value < DateTime.Now
You can use any K# macro there to build a bit more complicated rules if needed.
Please, sign in to be able to submit a new answer.