func (s *mustRunAsRange) Validate(fldPath *field.Path, _ *api.Pod, _ *api.Container, runAsNonRoot *bool, runAsUser *int64) field.ErrorList {
	allErrs := field.ErrorList{}

	if runAsUser == nil {
		allErrs = append(allErrs, field.Required(fldPath.Child("runAsUser"), ""))
		return allErrs
	}

	if *runAsUser < *s.opts.UIDRangeMin || *runAsUser > *s.opts.UIDRangeMax {
		detail := fmt.Sprintf("must be in the ranges: [%v, %v]", *s.opts.UIDRangeMin, *s.opts.UIDRangeMax)
		allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *runAsUser, detail))
		return allErrs
	}

	return allErrs
}
// Validate ensures that the specified values fall within the range of the strategy.
Validate ensures that the specified values fall within the range of the strategy.
// Validate ensures that the specified values fall within the range of the strategy .
func (s *mustRunAsRange) Validate(fldPath *field.Path, _ *api.Pod, _ *api.Container, runAsNonRoot *bool, runAsUser *int64) field.ErrorList {
	allErrs := field.ErrorList{}
	if runAsUser == nil {
		allErrs = append(allErrs, field.Required(fldPath.Child("runAsUser"), ""))
		return allErrs
	}
	if *runAsUser < *s.opts.UIDRangeMin || *runAsUser > *s.opts.UIDRangeMax {
		detail := fmt.Sprintf("must be in the ranges: [%v, %v]", *s.opts.UIDRangeMin, *s.opts.UIDRangeMax)
		allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *runAsUser, detail))
		return allErrs
	}
	return allErrs
}
func ( s * mustRunAsRange ) Validate ( fldPath * field . Path , _ * api . Pod , _ * api . Container , runAsNonRoot * bool , runAsUser * int64 ) field . ErrorList { allErrs := field . ErrorList { } if runAsUser == nil { allErrs = append ( allErrs , field . Required ( fldPath . Child ( " " ) , " " ) ) return allErrs } if * runAsUser < * s . opts . UIDRangeMin || * runAsUser > * s . opts . UIDRangeMax { detail := fmt . Sprintf ( " " , * s . opts . UIDRangeMin , * s . opts . UIDRangeMax ) allErrs = append ( allErrs , field . Invalid ( fldPath . Child ( " " ) , * runAsUser , detail ) ) return allErrs } return allErrs }
Validate ensures that the specified values fall within the range of the strategy.
Validate ensures that the specified values fall within the range of the strategy .