public function isValid($name = null)
    {
        $this->resetInputFilter()
            ->getInputFilter()
            ->setData($this->getValues());

        $names = $this->findScenario();
        if ($name !== null) {
            $names = array_intersect($names, (array)$name);
        }
        $isValid = $this->getInputFilter()
            ->setValidationGroup($names)
            ->isValid();
        $this->setValues($this->getInputFilter()->getValues());

        return $isValid;
    }
public function isValid($name = null)
    {
        $this->resetInputFilter()
            ->getInputFilter()
            ->setData($this->getValues());

        $names = $this->findScenario();
        if ($name !== null) {
            $names = array_intersect($names, (array)$name);
        }
        $isValid = $this->getInputFilter()
            ->setValidationGroup($names)
            ->isValid();
        $this->setValues($this->getInputFilter()->getValues());

        return $isValid;
    }
public function isValid ( $ name = null ) { $ this -> resetInputFilter ( ) -> getInputFilter ( ) -> setData ( $ this -> getValues ( ) ) ; $ names = $ this -> findScenario ( ) ; if ( $ name !== null ) { $ names = array_intersect ( $ names , ( array ) $ name ) ; } $ isValid = $ this -> getInputFilter ( ) -> setValidationGroup ( $ names ) -> isValid ( ) ; $ this -> setValues ( $ this -> getInputFilter ( ) -> getValues ( ) ) ; return $ isValid ; }
Validate inputs.
@param string|array|null $name
@return boolean
Validate inputs .