Merge pull request #20648 from deads2k/fix-validation

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-02-06 17:13:19 -08:00
commit 6103b8713e

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"))...)