I'm writing a couple of (custom) validators for my form and everything's going smoothly as always but for one little issue.
I have two fields: one is a html select input (aka dropDownList
) and the other is a simple textField
.
I've setup my ajax validators so that, when option X is selected on my dropDownList
, the text in the textField
can't be empty.
SO when a user selects option X in the dropDownList
, an error message (for the dropDownList
, mind you) comes up: text field Y can't be empty.
Good so far. When I then click on the textField
, type some stuff and click somewhere else on the screen, sure enough the ajax validator is fired off, and the HTTP response is empty meaning there are no errors on the form. But the error message does not disappear!
I'm guessing this has something to do with the fact that I'm using one field's validator to clearErrors()
on another field, but shouldn't this work? I've given the correct field as parameter to the clearErrors()
method..
Has anyone any idea of what might be going wrong for me?
Thanks in advance
EDIT here's the link to my Form Model: click
when I change target_constant
or source_constant
, a validator is fired off to the server. It is working, and by that I mean that an AJAX response does get sent by the server to my validator being fired off. In addition, the response body has no error messages, but still the error message for target_reg
or source_reg
(depending upon which of those was affected) does not go away in the same instant. Only in the next request/response does the error message disappear.