protected function purifyInputs(array $inputs)
    {
        $newInputs = [];

        foreach ($inputs as $key => $value) {
            if (is_array($value)) {
                throw new InvalidArgumentException('Input array can NOT contain nested arrays.');
            }

            if (strlen((string)$key) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one key whose name exceeds the max length allowed.");
            }

            if (strlen((string)$value) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one language value whose value exceeds the max length allowed.");
            }

            $newInputs[e($key)] = e($value);
        }

        return $newInputs;
    }