private function prepareValues($value): array
    {
        if (!self::hasMultipleValues($this->name)) {
            $values = is_array($value) ? $value : [trim($value)];
        } elseif (!is_array($value)) {
            $values = explode(',', (string) $value);
        } else {
            $values = $value;
        }

        foreach (array_keys($values) as $key) {
            $values[$key] = trim($values[$key]);

            if ($values[$key] == '') {
                unset($values[$key]);
            }
        }

        return array_values(array_unique($values));
    }