public function validateMin(string $key, array $def, $value)
    {
        if (!isset($def['options']) && isset($def['min']) && $value != '') {
            if (isset($def['type']) && ($def['type'] == 'int' || $def['type'] == 'numeric' || $def['type'] == 'float')) {
                if ($value < $def['min']) {
                    $this->addError($key, 'form.value_is_too_small', array('%limit%' => $def['min']));
                }
            } elseif (isset($def['type']) && ($def['type'] == 'date' || $def['type'] == 'datetime')) {
                if ($value instanceof DateTime) {
                    if (is_int($def['min'])) {
                        $limit = new DateTime();
                        $limit->sub(new DateInterval('P' . $def['min'] . 'D'));
                    } else {
                        $limit = new DateTime($def['min']);
                    }

                    if ($value < $limit) {
                        $format = $this->translate('form.' . $def['type']);

                        $this->addError($key, 'form.value_is_too_far_in_the_past', array('%limit%' => $limit->format($format)));
                    }
                }
            } elseif (isset($def['type']) && $def['type'] == 'list') {
                if (count($value) < $def['min']) {
                    $this->addError($key, 'form.value_min_options_selected', array('%limit%' => $def['min']));
                }
            } elseif (is_scalar($value) && (strlen($value) < $def['min'])) {
                $this->addError($key, 'form.value_is_too_short_chars', array('%limit%' => $def['min']));
            }
        }
    }