It is simple, in a page I want to use a form to receive user input that I will use to build an html fragment that I will append to the DOM with jquery without refreshing the page.
For this I create an ActiveForm with Ajax submit. If it is ok, I’d like to reset form to permit user adding another fragment.
The problem is that client validation work only at the first time. It is like the form store the first validation results.
A client validation is actually a customized javascript function for an input field. It is constructed on the server side when the input is created, depending on the validation rules of the field. You can check the html output and will find some javascript snippets that execute the client validations.
I guess your added html fragments don’t have those javascript snippets for the client validation.
thanks, the problem was in the form, not in the input appended in html fragment
I used a wrong code for ajax submit because I use .submit concatenated to event "beforeSubmit" and this sign the yiiActiveForm "validated" and on the second submit validation was skipped.