P
P
pyatin2012-09-12 14:29:27
Yii
pyatin, 2012-09-12 14:29:27

Yii captcha client validation?

Hello.
The problem is that there is a client validation and a captcha with the “update captcha” button on the form, the
javascript validator checks the captcha for an empty value and the correctness of the entered code.
After updating the javascript captcha, the validator does not pass the new value correctly.
The question is whether there are ways not to check the correctness of the entered captcha on the client?
I tried to use different variations of on in the rules, it did not work out.
If someone faced a similar problem, tell me the algorithm for solving the problem.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
omolota, 2012-12-21
@omolota

I solved the problem of captcha validation by writing the following code in the view file:
<?php echo $form->error($model, 'verifyCode',$htmlOptions=array(), $enableAjaxValidation=false, $enableClientValidation=false); ?>

F
FAST, 2012-09-12
@FAST

Didn't check, but api should work
www.yiiframework.com/doc/api/1.1/CActiveForm#error-detail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question