フランチョスとsymfonyat PHPフランチョスとsymfony - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドの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)); } 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch