How to validate Form TextField with Forge

Hi, i’m developing a form in Jira with Forge on a issuepanel, but on forge documentation there it is not a validator on the text

Hi @FranciscoGomezBalast,

When you say “there is not a validator on the text”, what do you mean by that? Are you trying to validate the input of a field against something? Let me know what you are trying to do and I can help you out :slight_smile:

Hello, I want to:

  1. Check input of a Textfield by calling an external API
  2. If HTTP 200, store the value
  3. If HTTP != 200, display error message on the Textfield.

I am currently using onSubmit() to get the value and call the external API. This works nicely.

Once I’m in onSubmit() and calling an external API, how to do I set an error message on the Textfield if the external API returns != 200?