public function validate($data = null, $entity = null)
    {
        if (is_null($data)) {
            $data = $this->getData();
        }

        $this->data = $data;
        return !count(parent::validate($data, $entity));
    }