protected function validateDomainStore()
    {
        $field = 'domain';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        if ($this->getSubmitted('default')) {
            $this->unsetSubmitted('domain'); // Cannot update domain of default store
            return null;
        }

        $label = $this->translation->text('Domain');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
        }

        $updating = $this->getUpdating();
        if (isset($updating['domain']) && $updating['domain'] === $value) {
            return true;
        }

        $existing = $this->store->get($value);

        if (!empty($existing)) {
            $this->setErrorExists($field, $label);
            return false;
        }

        return true;
    }