Zend Framework

Zend_Validate_PostCode error message problem

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.0
  • Fix Version/s: 1.10.2
  • Component/s: Zend_Validate
  • Labels:
    None

Description

Zend_Validate_PostCode needs:

$this->_setValue($value);

inside isValid() method

Activity

Hide
Thomas Weidner added a comment -

Please give something which is reproducable.
Just a "xxx needs" or "xxx should be" is not enough.

Show
Thomas Weidner added a comment - Please give something which is reproducable. Just a "xxx needs" or "xxx should be" is not enough.
Hide
Thomas Weidner added a comment -

Changing from Patch to Bug as no patch has been assigned to this issue.

Show
Thomas Weidner added a comment - Changing from Patch to Bug as no patch has been assigned to this issue.
Hide
Wojciech Sielski added a comment -

If you attach this Validator to Zend_Form like:

(...)
'validators' => array (new Zend_Validator_Postcode('pl_PL')),
(...)

And write in form for example string "hello" it shows error like:

"'' is wrong formated postcode"

Message in Zend_Validator_Postcode is set to
"'%value%' is wrong formated postcode"

And as you can see in this weak example that %value% is not set in isValid() method.

Sorry for this not formal code but I`m out of office now.

Show
Wojciech Sielski added a comment - If you attach this Validator to Zend_Form like: (...) 'validators' => array (new Zend_Validator_Postcode('pl_PL')), (...) And write in form for example string "hello" it shows error like: "'' is wrong formated postcode" Message in Zend_Validator_Postcode is set to "'%value%' is wrong formated postcode" And as you can see in this weak example that %value% is not set in isValid() method. Sorry for this not formal code but I`m out of office now.
Hide
Thomas Weidner added a comment -

Fixed with r21107

Show
Thomas Weidner added a comment - Fixed with r21107

People

Vote (2)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: