Form shows error when redisplayed

In the flowable task application, I need to do some dynamic validation. I check if a certain input field has not already been taken and if it has I send the task back to the user. But all the fields show the initial red border showing failed validation.

This field has validation of length 1 and it looks like this on redisplay:

image

Even after adding more text to it it still shows error:
image

It only takes away the red border after deleting all text and retyping it.

I am also not sure how this is typically modeled: validating input from a form (after a number of steps) and then sending user back to the form. I basically have an exclusive gateway after the validation is done, which sends the flow back to the original form entry task.