フランチョスとsymfony
at PHP
[
2ch
|
▼Menu
]
■コピペモード
□
スレを通常表示
□
オプションモード
□このスレッドのURL
■項目テキスト
300:283 08/08/01 13:56:08 293のフォームとは違うのですが public function isValid() { $result = parent::isValid(); print_r($this->getValue('a')); if($this->getValue('a') == '2') // Aが2かどうか { if($this->getValue('b') === '') { $this->getErrorSchema()->addError( new sfValidatorError(new sfValidatorPass(), "bが空欄です。"),'b'); $this->isBound = false; } } else { if($this->getValue('c') === '' || $this->getValue('d') === '') { $this->getErrorSchema()->addError( new sfValidatorError(new sfValidatorPass(), "cまたはdが空欄です。"),'c'); $this->isBound = false; } if($this->getValue('e') === '' || $this->getValue('f') === '') { $this->getErrorSchema()->addError( new sfValidatorError(new sfValidatorPass(), "eまたはfが空欄です。"),'f'); $this->isBound = false; } } return $result & (0 == count($this->errorSchema)); }
次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
レスジャンプ
mixiチェック!
Twitterに投稿
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch
4814日前に更新/217 KB
担当:undef