Can I create a variable to change to error state I created for input field

States are a challenge for me to trigger.

I want to change the border color on an input field if the field returns an error. B/c the border color has a bug and does allow it be set to a formula, I need to find a different way than using my error state color variable.

I set up an error state. Any suggestions on how to trigger this? Or is there a better way until the border color formula bug is fixed?