Rename validation 'New' funcs

This commit is contained in:
Tim Hockin
2015-11-03 16:17:48 -08:00
parent 682f2a5a79
commit ceee678b29
12 changed files with 297 additions and 297 deletions

View File

@@ -27,10 +27,10 @@ func ValidateEvent(event *api.Event) validation.ErrorList {
// TODO: There is no namespace required for node.
if event.InvolvedObject.Kind != "Node" &&
event.Namespace != event.InvolvedObject.Namespace {
allErrs = append(allErrs, validation.NewFieldInvalid("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
allErrs = append(allErrs, validation.NewInvalidError("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
}
if !validation.IsDNS1123Subdomain(event.Namespace) {
allErrs = append(allErrs, validation.NewFieldInvalid("namespace", event.Namespace, ""))
allErrs = append(allErrs, validation.NewInvalidError("namespace", event.Namespace, ""))
}
return allErrs
}

File diff suppressed because it is too large Load Diff