kind === 'email' ? strtolower(trim(strstr($value, '@', true) ?: $value)) : strtolower(trim($value)); // Collapse separators so "super_admin", "super-admin" and "superadmin" all match. $normalized = preg_replace('/[\s._\-]+/', '', $candidate) ?? $candidate; foreach (self::RESERVED as $word) { $target = preg_replace('/[\s._\-]+/', '', $word) ?? $word; if ($normalized === $target) { $fail($this->kind === 'email' ? 'That email address is reserved. Please use a different one.' : 'That name is reserved. Please choose a different one.'); return; } } } }