ZF-10668: Can't get input data
Description
I'm using Zend_Filter_Input to pass data to it and get escaped value of fields.
I notice if you want create a email Rule using Zend_Validate_emailAdress
$emailValidator = new Zend_Validate_EmailAddress(array('allow'=>Zend_Validate_Hostname::ALLOW_DNS,'mx'=>true));
Like this,
the $input->getEscaped(); give me empty value If i remove the mx parameter to false it's give me the mail value (eg : ffff@tesfsdfsinsf.com)
There is maybe a problem with return function ?
Comments
Posted by Ralph Schindler (ralph) on 2010-11-11T07:27:42.000+0000
Can you please supply a reproduction script that includes the bit of code that shows how you are attempting to utilize Zend_FIlter_Input? The above information is not enough to understand the problem you are attempting to describe.
Thanks! Ralph
Posted by Nicolas Renardet (xenesis) on 2010-11-11T07:42:29.000+0000
And in my controller i have write this :
$input->getEscaped('emailF') return nothing if i let MX = true in the validator
I add (following the official ZF doc) a empty validator to get the value (by using array_merge on $input->getUnknown()), so at the end of $validator i wrote this :
'*' => array()
I can get the input field by this way but if i encounter error like empty for this validator message, getErrors() present me the emailF error msg (empty value) and '*' empty value too.
Posted by Nicolas Renardet (xenesis) on 2010-11-11T07:45:26.000+0000
I precise :
$input->getEscaped('emailF') return nothing if i let MX = true in the EmailAdress validator constructor else if i let mx to false, i get the value : 'wrong@@value.fr' that i expected