How to run YiiActiveForm validator before Ajax Submit

Hello All,

How to run YiiActiveForm validator before Ajax Submit.

I have created an Ajax Button inside CActiveForm using this:




echo

CHtml::ajaxSubmitButton(

	'Add This Client',

	__URL . '/create',

	array(

    	'success' => 'js:function(data){$.fn.renewSummary(data)}',

    	'dataType' => 'json'

	),

	array(

    	'class' => 'btn btn-success'

	)

);



Will you tell me which function I should run before ajax request and How?

Thanks a lot