独自のカスタム エラー メッセージを Captcha に設定しようとしていますが、何らかの理由で 2 回エコーされます。
ここに私のキャプチャコードがあります:
$captcha = new Zend_Form_Element_Captcha(
'captcha', // This is the name of the input field
array('captcha' => array(
// First the type...
'captcha' => 'Image',
// Length of the word...
'wordLen' => 6,
// Captcha timeout, 5 mins
'timeout' => 300,
// What font to use...
'font' => 'images/captcha/font/arial.ttf',
// URL to the images
'imgUrl' => '/images/captcha',
//alt tag to keep SEO guys happy
'imgAlt' => "Captcha Image - Please verify you're human"
)));
そして、自分のエラーメッセージを設定するには:
$captcha->setErrorMessages(array('badCaptcha' => 'My message here'));
検証が失敗すると、次のようになります。
'My message here; My message here'
エラーが重複するのはなぜですか?どうすれば修正できますか?