error message in not showing while comparing starting and end date

hi

i have created client and server side validation as like below:-

[['end_date'], 'compare', 'compareAttribute'=>'start_date', 'operator'=>'>=','message' => 'Please choose a username.'],

its working fine,but error message is not showing …

<?= $form->field($student, ‘index_id’)->dropDownList(ArrayHelper::map(student::find()->all(), ‘index_id’, ‘code’), array(‘empty’=>’’,‘multiple’=>true ,‘style’=>‘width:400px;’,‘size’=>‘10’)) ?>

this is the answer.