src/User/Form/UserAdd.php
public function isValid()
    {
    	$data = $this->data;
    	
        if(((isset($data['password']) && $data['password']) || 
        	(isset($data['repassword']) && $data['repassword'])) && !$this->skipCurrentPasswordValidation) {
        	$filter = $this->getInputFilter();
        	$cp = $filter->get('currentpassword');
        	$cp->setRequired(true);
        	$cp->setAllowEmpty(false);
        }
        
    	return parent::isValid();
    }
public function isValid()
    {
    	$data = $this->data;
    	
        if(((isset($data['password']) && $data['password']) || 
        	(isset($data['repassword']) && $data['repassword'])) && !$this->skipCurrentPasswordValidation) {
        	$filter = $this->getInputFilter();
        	$cp = $filter->get('currentpassword');
        	$cp->setRequired(true);
        	$cp->setAllowEmpty(false);
        }
        
    	return parent::isValid();
    }
public function isValid ( ) { $ data = $ this -> data ; if ( ( ( isset ( $ data [ 'password' ] ) && $ data [ 'password' ] ) || ( isset ( $ data [ 'repassword' ] ) && $ data [ 'repassword' ] ) ) && ! $ this -> skipCurrentPasswordValidation ) { $ filter = $ this -> getInputFilter ( ) ; $ cp = $ filter -> get ( 'currentpassword' ) ; $ cp -> setRequired ( true ) ; $ cp -> setAllowEmpty ( false ) ; } return parent :: isValid ( ) ; }
(non-PHPdoc)
@see \Zend\Form\Form::isValid()
( non - PHPdoc )