Commit 31028566 authored by Alex Robinson's avatar Alex Robinson

Merge pull request #7356 from soltysh/fix_secret_validation

Fixed validation message when trying to submit incorrect secret
parents b8de4960 cd183bbb
...@@ -1172,7 +1172,7 @@ func ValidateSecret(secret *api.Secret) errs.ValidationErrorList { ...@@ -1172,7 +1172,7 @@ func ValidateSecret(secret *api.Secret) errs.ValidationErrorList {
totalSize := 0 totalSize := 0
for key, value := range secret.Data { for key, value := range secret.Data {
if !util.IsDNS1123Subdomain(key) { 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) totalSize += len(value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment