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;
    }