{"id":"0c6f99b40eb4dea0","repo":"docker/cli","slug":"s-is-not-a-valid-domain","errorCode":null,"errorMessage":"%s is not a valid domain","messagePattern":"(.+?) is not a valid domain","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/opts.go","lineNumber":217,"sourceCode":"\t_, err := net.ParseMAC(strings.TrimSpace(val))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn val, nil\n}\n\n// ValidateDNSSearch validates domain for resolvconf search configuration.\n// A zero length domain is represented by a dot (.).\nfunc ValidateDNSSearch(val string) (string, error) {\n\tif val = strings.Trim(val, \" \"); val == \".\" {\n\t\treturn val, nil\n\t}\n\treturn validateDomain(val)\n}\n\nfunc validateDomain(val string) (string, error) {\n\tif alphaRegexp.FindString(val) == \"\" {\n\t\treturn \"\", fmt.Errorf(\"%s is not a valid domain\", val)\n\t}\n\tns := domainRegexp.FindSubmatch([]byte(val))\n\tif len(ns) > 0 && len(ns[1]) < 255 {\n\t\treturn string(ns[1]), nil\n\t}\n\treturn \"\", fmt.Errorf(\"%s is not a valid domain\", val)\n}\n\nconst whiteSpaces = \" \\t\"\n\n// ValidateLabel validates that the specified string is a valid label, and returns it.\n//\n// Labels are in the form of key=value; key must be a non-empty string, and not\n// contain whitespaces. A value is optional (defaults to an empty string if omitted).\n//\n// Leading whitespace is removed during validation but values are kept as-is\n// otherwise, so any string value is accepted for both, which includes whitespace\n// (for values) and quotes (surrounding, or embedded in key or value).","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/opts.go#L199-L235","documentation":"Error \"%s is not a valid domain\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/opts.go:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}