Merge pull request #20648 from deads2k/fix-validation

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2016-02-06 17:13:19 -08:00
commit 6103b8713e
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn Val
}
} else {
if len(meta.Namespace) != 0 {
allErrs = append(allErrs, field.Forbidden(fldPath, "not allowed on this type"))
allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
}
}
allErrs = append(allErrs, ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...)