public function validateRequired(string $key, array $def, $value)
    {
        if (isset($def['required']) && ($def['required'] === true) && ($value === null || $value === '' || $value === false)) {
            $this->addError($key, 'form.value_must_not_be_empty');
        }
    }