code: func ValidateIPBlock(ipb *networking.IPBlock, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	if len(ipb.CIDR) == 0 || ipb.CIDR == "" {
  		allErrs = append(allErrs, field.Required(fldPath.Child("cidr"), ""))
  		return allErrs
  	}
  	cidrIPNet, err := apivalidation.ValidateCIDR(ipb.CIDR)
  	if err != nil {
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("cidr"), ipb.CIDR, "not a valid CIDR"))
  		return allErrs
  	}
  	exceptCIDR := ipb.Except
  	for i, exceptIP := range exceptCIDR {
  		exceptPath := fldPath.Child("except").Index(i)
  		exceptCIDR, err := apivalidation.ValidateCIDR(exceptIP)
  		if err != nil {
  			allErrs = append(allErrs, field.Invalid(exceptPath, exceptIP, "not a valid CIDR"))
  			return allErrs
  		}
  		if !cidrIPNet.Contains(exceptCIDR.IP) {
  			allErrs = append(allErrs, field.Invalid(exceptPath, exceptCIDR.IP, "not within CIDR range"))
  		}
  	}
  	return allErrs
  }
docs: // ValidateIPBlock validates a cidr and the except fields of an IpBlock NetworkPolicyPeer