Cleanup of validation.go
This commit is contained in:
@@ -28,7 +28,7 @@ func ValidateEvent(event *api.Event) errs.ValidationErrorList {
|
||||
if event.Namespace != event.InvolvedObject.Namespace {
|
||||
allErrs = append(allErrs, errs.NewFieldInvalid("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
|
||||
}
|
||||
if !util.IsDNSSubdomain(event.Namespace) {
|
||||
if !util.IsDNS1123Subdomain(event.Namespace) {
|
||||
allErrs = append(allErrs, errs.NewFieldInvalid("namespace", event.Namespace, ""))
|
||||
}
|
||||
return allErrs
|
||||
|
Reference in New Issue
Block a user