Yii ajax验证不显示错误消息

I have some problem with displaying an error message when I validate form via Ajax. Ajax validation works fine but doesn't show an error message. In console I get validation error message, also when I type

<?php echo $form->errorSummary($model); ?>

It also displays all error message, but I need displaying each message corresponding to appropriate attribute of model. So this:

<?php echo $form->error($model, 'date_check_in') ?>

Don't show an error message. Here is piece of form

<?php $form = $this->beginWidget('CActiveForm', array(
'id' => 'form-main',
'action' => Yii::app()->createUrl('/kolobok/default/order'),
'htmlOptions' => array(
    'class' => 'form-horizontal',
),
'enableAjaxValidation'=>true,
'enableClientValidation'=>false,
'clientOptions'=>array(
    'validateOnSubmit'=>true,
    'validateOnChange'=>false,
    'validateOnType'=>false,
    'afterValidate' => 'js: function(form, data, hasError) {
                if (data == null) return true;
       if (data.length && data.length > 0) return false;
       if (data.length === 0)  return true;
       for (var key in data) {
           if (hasOwnProperty.call(data, key)) return false;
       }
       return true;
   }'
),
)); ?>

My action:

    public function actionOrder()
{
    $model=new Order;
    if(isset($_POST['ajax']) && $_POST['ajax']==='form-main')
    {
        echo CActiveForm::validate($model);
        Yii::app()->end();
    }
    if(isset($_POST['Order']))
    {
        $model->attributes=$_POST['Order'];

        if( $model->save()){
            Yii::app()->user->setFlash('success', "Data1 saved!");
            $this->redirect(Yii::app()->request->urlReferrer);
        }

    }

}

Also, form displaying via the widget. What do I wrong?

The problem was in id of input field. I deleted id and it helped!