validate by ajax request

Hi,

in my main page I load form by ajax. How to update the div if form is not valid and not be redirect to an error page?

Thanx!

Hi qwerty,

I've written a small extension that does perform client-side validation, so the form displays validation errors without the need to send a request to the server.

Another solution is to only rely on Yii validation, in a controller action. Use

Yii::app()->request->isAjaxRequest

…to test for ajax submition. You may finde more information in this thread (http://www.yiiframework.com/forum/index.php/topic,758.msg4149.html#msg4149) and in the Yii blog demo.

hope that helped

8)

Hi Raoul,

thanx, I try your extension.