...
The 'Date Expression Compare' validator check compares the value of a date field with a date expression (for example, date field must be more recent than actual date). If the validation check fails, the transition will not be completed.
...
For information on how to configure a validator check in JIRA, see the JIRA documentation.
...
A workflow is configured so that the 'Resolve' transition has the 'Date Expression Compare' validator check where 'Due Date' > '5d'. If a user attempts to resolve an issue on this workflow, where the 'Due Date' is less than 5 days from now, the validation check will fail and the transition will not be completed.
...