code: 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();
      }
docs: (non-PHPdoc)
  @see \Zend\Form\Form::isValid()