Skip to content

Instantly share code, notes, and snippets.

@damour
Created July 8, 2013 12:03
Show Gist options
  • Select an option

  • Save damour/5948203 to your computer and use it in GitHub Desktop.

Select an option

Save damour/5948203 to your computer and use it in GitHub Desktop.
yii ajax validation controller
protected function performAjaxValidation($model)
{
if (isset($_POST['ajax']) && $_POST['ajax'] === 'user-form') {
echo CActiveForm::validate($model);
Yii::app()->end();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment