Show error if user selects past date in Due Date (Forge UI Modifications)

Hi everyone,
I’m using Forge UI Modifications in a Jira Cloud app. I want to show an error on the screen when a user selects a past date in the Due Date field.

The goal is:

  • If the selected date is before today, show a message near the field
  • Prevent the user from creating the issue with that invalid date

Is there any method like setError() (like we have setRequired(), setName(), etc.) to show a field-level error?

Right now I’m using setDescription(), but I was wondering if there’s a better or official way to handle this kind of validation?

Thanks!