Yii- client side validation is not working on CActiveForm

client-side-validation, javascript, php, twitter-bootstrap, yii

Solution

I've finally resolved the problem. I'm posting this so that it may help someone with the same problem.

The problem was caused because jquery.js was not loaded properly in the application. The map file was missing that is required by the jquery.js. So I downloaded the latest jquery 2.1.1.min.js & respective map file from [http://jquery.com/download/] and loaded them in the main layout. Now the validation is finally working.

Hope this workaround will help someone with same problem.

Problem

I've an active form in my application. But the client side validation is not working. The code of the form are as shown below: ``` <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'application-data-student-form', 'enableAjaxValidation'=>false, 'enableClientValidation'=>true, 'clientOptions'=>array('onSubmit'=>true), 'htmlOptions'=>array( 'enctype'=>'multipart/form-data', 'role'=>'form', 'class'=>'form-horizontal' ), )); ?> ``` I've used bootstrap 3 in my project. Any idea or solution will be highly appreciated from anybody . . .

Original source