mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Merge pull request #2410 from barnardb/service-name-error-message
Correct error message re length of service name
This commit is contained in:
@@ -2267,7 +2267,7 @@ func (s *Service) ValidateName(name string) error {
|
||||
// (https://tools.ietf.org/html/rfc2782).
|
||||
re := regexp.MustCompile(`^(?i:[a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])$`)
|
||||
if !re.MatchString(name) {
|
||||
return fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be less than 63 characters long: %q", name)
|
||||
return fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be no longer than 63 characters: %q", name)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user