Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sanjarhakimi's avatar

Date Restriction

On a form, I want to introduce a Due Date field. As part of field validation, I want to restrict the User to not able to choose a date earlier then current date. So if today is April 22, 2016, the User cannot choose April 21, 2016.

0 likes
2 replies
Snapey's avatar

If you want to limit the user choice, ideally you would use a form control that limits the dates and provides immediate feedback.

Use the validation rule just to check someone is not trying to be clever.

Please or to participate in this conversation.