public function validateOptions()
    {
        if (!$this->rules instanceof AllOf) {
            throw new InvalidArgumentException('Validation rules are missing or invalid');
        }

        if (!$this->hasKey()) {
            throw new InvalidArgumentException('A key must be set');
        }

        if ($this->hasMessage() && !is_string($this->message)) {
            throw new InvalidArgumentException(sprintf('Expected custom message to be of type string, %s given', gettype($this->message)));
        }
    }