ZF-7034: Don't get NotEmpty Validator if it's still exists in FiterChain

Issue Type: Bug Created: 2009-06-17T02:14:17.000+0000 Last Updated: 2009-08-28T01:56:44.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: testmwi (testmwi) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter_Input

Related issues: - ZF-1912



In Zend_Filter_Input the 'NotEmpty' Validator is always added to the validator chain. We've defined :

$validator = array( 'street' => array ( new Zend_Validate_NotEmpty ( ), new Zend_Validate_Regex ( '/^[a-zA-Z0-9\xC0-\xFF`\'\/.-\s]{1,26}$/u' ), new Zend_Validate_StringLength ( 0, 25 ), Zend_Filter_Input::PRESENCE => Zend_Filter_Input::PRESENCE_REQUIRED, Zend_Filter_Input::DEFAULT_VALUE => '', Zend_Filter_Input::BREAK_CHAIN => true, 'messages' => array ( 0 => 'Bitte geben Sie Ihre Straße ein.', 1 => 'Verwenden Sie bitte keine Sonderzeichen bei der Eingabe.', array ( Zend_Validate_StringLength::TOO_LONG => 'Bitte beschränken Sie sich auf %max% Zeichen' ) )

We would have the error message 0 if street is an empty param, instead of default 'notEmptyMessage'.


Posted by Thomas Weidner (thomas) on 2009-08-24T08:39:00.000+0000

Can you provide us with a full example ? Your filter settings, calling method and input value so we get the same results.

Posted by Thomas Weidner (thomas) on 2009-08-27T10:40:28.000+0000

Fixed with r17845

Posted by testmwi (testmwi) on 2009-08-28T01:56:26.000+0000

Thank's a lot. I've tested this and it's working fine.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.