public function getValidator()
    {
        if(!$this->hasValidator() && $this->hasForm()) {
            $this->setValidator(clone $this->getForm()->getValidator());
            $this->getValidator()->clearErrors()->clearMessages()->clearRules();
        }
        return $this->validator;
    }