3
vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
generated
vendored
3
vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
generated
vendored
@@ -23,6 +23,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
)
|
||||
|
||||
// IsNegativeErrorMsg is a error message for value must be greater than or equal to 0.
|
||||
const IsNegativeErrorMsg string = `must be greater than or equal to 0`
|
||||
|
||||
// ValidateNameFunc validates that the provided name is valid for a given resource type.
|
||||
@@ -75,7 +76,7 @@ func maskTrailingDash(name string) string {
|
||||
return name
|
||||
}
|
||||
|
||||
// Validates that given value is not negative.
|
||||
// ValidateNonnegativeField validates that given value is not negative.
|
||||
func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
if value < 0 {
|
||||
|
||||
Reference in New Issue
Block a user