If I write all of the data correctly and also the validation code from the image, it does not work, it shows me that captcha is incorrect. After that the image is changed, i write it again the validation code and it works. My question is why ? and what should i do ? this is the rules from the model: i
f ($this->scenario == "insert") {
return array(
array('requisition_id, sync', 'numerical', 'integerOnly' => true),
array('lastname, firstname, email, dob, phone, cv_path, experienceMonths, experienceYears, competencies, token', 'required', 'message' => "invalid"),
array('email', 'email', 'message' => "Emailul este invalid!"),
array('dob', 'validateDob'),
array('dayOfBirth, monthOfBirth, yearOfBirth', 'safe'),
array('taleo_id, sync', 'required', 'on' => 'taleoUpdate'),
array('verifyCode', 'captcha', 'captchaAction'=>'site/captcha')
// array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements(),'on' => 'register')
);
} else if ($this->scenario == 'taleoUpdate') {
return array(
array('taleo_id, sync', 'required'),
);
}
else if($this->scenario == 'notjobapply'){
return array(
array('lastname, firstname, email, phone, cv_path, requisition_id', 'required', 'message'=>'Câmpul este obligatoriu'),
array('email', 'email', 'message' => "Emailul este invalid!"),
);
}
and this is the view:
$this->widget('CCaptcha',
array(
'captchaAction' =>'site/captcha',
'buttonOptions' => array('class'=>'test','style' => 'display:block'),
)
);
<?php echo $form->textField($applicant,'verifyCode',array('class' => 'captcha', 'placeholder' => 'Captcha')); ?>
<?php echo $form->error($applicant,'verifyCode', array(), false, false); ?>