protected function validateOptions(array $options, FieldTypeInterface $field)
    {
        $parsed = [];

        foreach ($options as $key => $value) {
            if (! in_array($key, $field->getAllowedOptions(), true)) {
                throw new \DomainException('The "'.$key.'" option is not allowed on the provided field.');
            }

            $parsed[$key] = $value;
        }

        return $parsed;
    }