public function addValidation(Element &$element, array $data)
    {
        foreach ($data as $key => $value) {
            if (is_string($key)) {
                $element->getInput()->getValidatorChain()->add(StaticValidator::create($key, $value));
                $this->checkRequired($key, $element);
            } else {
                $element->getInput()->getValidatorChain()->add(StaticValidator::create($value));
                $this->checkRequired($value, $element);
            }
        }
    }