enableAjaxValidation not working

hi there, in the default signup form, i enable ajax validation and add more fields in signup model, but ajax validation not working:




<?php $form = ActiveForm::begin(['id' => 'form-signup', 'enableAjaxValidation' => true]); ?>

...

...

<?php ActiveForm::end(); ?>



do i missing sth in the model or signup action?

thanks in advanced

tried to use this link but get internal error 500 from inspect element

http://www.yiiframework.com/doc-2.0/guide-input-validation.html#ajax-validation

this is my form:


<?php $form = ActiveForm::begin(['enableAjaxValidation' => true, 'id' => 'signup_form','options'=>['class' => 'form'] ,'action'=>  \yii\helpers\Url::to(['site/signup'])]); ?>

and the action:




$model = new SignupForm();

if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {

    Yii::$app->response->format = Response::FORMAT_JSON;

    return ActiveForm::validate($model);

}