Merge pull request #49587 from ryanmcnamara/rm/improve-error-message

Automatic merge from submit-queue (batch tested with PRs 48068, 49587)

DNS name error message improvement

**What this PR does / why we need it**:
Small error message fix. The error message misled me slightly / would have saved time if correct

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
n/a
**Special notes for your reviewer**:
n/a
**Release note**:

n/a
This commit is contained in:
Kubernetes Submit Queue 2017-08-08 05:29:51 -07:00 committed by GitHub
commit f6cb2fce00

View File

@ -126,7 +126,7 @@ func IsDNS1123Subdomain(value string) []string {
} }
const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?" const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character"
const DNS1035LabelMaxLength int = 63 const DNS1035LabelMaxLength int = 63
var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$") var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$")