1
任何人都可以告訴我我們如何禁用驗證行動?實際上,我想根據動作的某些條件動態禁用驗證。我不知道我們該怎麼做?請幫幫我。如何禁用symfony中的操作驗證?
我的驗證如下:
$this->setValidators(
array(
'search_text' => new sfValidatorString(
array('required'=>true),
array('required' => 'Please enter keyword')),
'field_type' => new sfValidatorString(
array('required'=>true),
array('required' => 'Please select an option')),
)
);
我想在行動中動態禁用上述驗證。
請幫幫我。