开发者

Does Zend_Validate work on filtered/unfiltered values?

开发者 https://www.devze.com 2023-01-08 14:04 出处:网络
i wonder if a Zend_Form_Element has filters attached to it, will Zend_Validate validate the filtered or 开发者_开发知识库unfiltered inputs?Unfiltered.

i wonder if a Zend_Form_Element has filters attached to it, will Zend_Validate validate the filtered or 开发者_开发知识库unfiltered inputs?


Unfiltered. Filters applied to the elements when you try to get their values via getValue() method.


i guess it depends on what u pass as the values. in the context of forms,

$form->isValid($this->getRequest()->getParams()); // unfiltered
$form->isValid($form->getValues()); // filtered, cos getValues() returns filtered values
0

精彩评论

暂无评论...
验证码 换一张
取 消