Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
symfony1.4 とそのフォームの場合、事前/フォーム/事後検証に問題があります。現在の日付でフィールドを検証したい。現在の日付なので、明示的に提供する必要はありません。
どのようにできるのか?
適切な方法は、現在の日付をアクションからフォームにオプションとして渡し、フォームからバリデーターにオプションとして再度渡すことです。
$form->addOption("name","value"); $this->validatorSchema['field']=new myValidator(array('option1'=>'value);
上記のオプションは、この場合、現在の日付である必要があります。