Ok, because InputFilter has default values
allowEmpty = false and required = true, I've omited NotEmpty validator.

 public function __construct ()
    {
        $filterChain = new FilterChain();
        $filterChain->attachByName('StripTags')
            ->attachByName('StringTrim');
       
        $nazev = new Input('nazev');
        $nazev->setFilterChain($filterChain);
        $nazev->setErrorMessage('input 1 is empty');
        $this->add($nazev);
           
        $nazev2 = new Input('nazev2');
        $nazev2->setFilterChain($filterChain);
        $nazev->setErrorMessage('input 2 is empty');
        $this->add($nazev2);
   } 



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-Validator-chain-logic-tp4658136p4658156.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to