Cactiveform Validate Data Before Submit

In the view part, it contains a form with some textFields, I want to click the submit button then it will check whether the publication_date is today, if not it will pop a alarm say Do you want to change it to today, two buttons yes or no. But how to check the form values before submit the form, and also for the popup window about want to change date.




<?php $form=$this->beginWidget('CActiveForm', array(

	'id'=>'dataset-form',

	'enableAjaxValidation'=>false,

    'htmlOptions'=>array(

        'class'=>'form-horizontal',

        'enctype'=>'multipart/form-data'),

)); ?>


<?php echo $form->labelEx($model,'publication_date',array('class'=>'control-label')); ?>

<?php echo $form->textField($model,'publication_date',array('class'=>'date')); ?>




<?= CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn-green')); ?>



In the Controllers part it has


  public function actionUpdate($id)