Validation does not run when using setValue()

If I set a value on a Text Input that is a required field the validation does not run so it still has validationState.required set to ERROR.

So I assumed that it is run onBlur behind the scenes. I tried using .focus() to maybe force onBlur, but onBlur does not fire if you use .focus().

Other ideas I can try to get the proper validation checks without making the user click into each field?

Hello hello @bradlymathews!

To make sure I'm following, are your current steps:

  1. Text Input with validation (let's say with max = 5)
  2. textinput1.setValue(100)
  3. No validation (re)check

If so, I was able to repro the issue and it certainly seems like a bug. I wrote up an internal bug report for this, and will reach back in this thread on fix! Thank you for surfacing this 😊

1 Like