宮川 貴子
info****@nekog*****
2011年 5月 13日 (金) 17:58:11 JST
こんにちわ NEKOGETです。
language/japanese/form_validation_lang.phpの中に
$lang['greater_than'] があるか、確認してみてください。
無いなら、それが原因だと思います。
On 2011/05/13, at 17:36, 前田 wrote:
> お尋ねします。
> どうか、ご教授ください。
>
> Codeigniter 2.0.1で、
> Unable to access an error message corresponding to your field name.
> という、エラーがでました。
>
> バリデーションで、
> 'withdraw' => array(
> array(
> 'field' => 'ownWithdrawalReason',
> 'label' => '退会理由',
> 'rules' =>
> 'trim|required|min_length[1]|max_length[1]|numeric|greater_than[0]'
> )
> ),
> と設定して、
>
> ビュー側を、
> <selectname="ownWithdrawalReason">
> <option value='0' selected="selected">退会理由を選択</option>
> <option value='1'>理由1</option>
> <option value='2'>理由2</option>
> <option value='3'>理由3</option>
> <option value='4'>理由4</option>
> <option value='5'>理由5</option>
> <option value='6'>理由6</option>
> </select></td></tr>
>
> としています。
>
> コントローラ側では、
>
> if ($this->form_validation->run('withdraw') === FALSE){
> $this->load->view('/withdraw_confirm');
> }
>
> としているのですが、”0”を選択すると、”退会理由”のエラー文言がでません。
> 「Unable to access an error message corresponding to your field name.」
> と、出てしまいます。
>
> これは、バグですか?
>
> ----
> 前田
>
> _______________________________________________
> Codeigniter-users mailing list
> Codei****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/codeigniter-users