public function validate($context = 'default', array $data = [])
    {
        if (!empty($data)) {
            $this->setData($data);
        }

        $this->setContext($context);
        $rules = $this->buildRulesArray();
        $validator = $this->factory->make($this->filterArray($rules, $this->data), $rules);
        if ($validator->passes()) {
            return $validator->getData();
        }
        throw new ValidationException($validator);
    }