Merge pull request #7356 from soltysh/fix_secret_validation

Fixed validation message when trying to submit incorrect secret
This commit is contained in:
Alex Robinson 2015-04-27 10:22:51 -07:00
commit 31028566e3

View File

@ -1172,7 +1172,7 @@ func ValidateSecret(secret *api.Secret) errs.ValidationErrorList {
totalSize := 0
for key, value := range secret.Data {
if !util.IsDNS1123Subdomain(key) {
allErrs = append(allErrs, errs.NewFieldInvalid(fmt.Sprintf("data[%s]", key), key, cIdentifierErrorMsg))
allErrs = append(allErrs, errs.NewFieldInvalid(fmt.Sprintf("data[%s]", key), key, dnsSubdomainErrorMsg))
}
totalSize += len(value)