// validate makes sure the types are sound
1695
func (typedData *TypedData) validate() error {
	if err := typedData.Types.validate(); err != nil {
		return err
	}
	if err := typedData.Domain.validate(); err != nil {
		return err
	}
	return nil
}
70328
func (m *Body) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Truncated

	switch m.BodyType.(type) {

	case *Body_AsBytes:
		// no validation rules for AsBytes

	case *Body_AsString:
		// no validation rules for AsString

	}

	return nil
}
1060999
func (podStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	pod := obj.(*api.Pod)
	allErrs := validation.ValidatePod(pod)
	allErrs = append(allErrs, validation.ValidateConditionalPod(pod, nil, field.NewPath(""))...)
	return allErrs
}
991174
func (v *Validator) Validate(i interface{}) error {
	value := reflects.Indirect(reflect.ValueOf(i))
	if value.Kind() != reflect.Struct {
		return errors.New("valid: target value must be a struct")
	}

	key := v.Tag
	if key == "" {
		key = Tag
	}
	ctx := &Context{messages: messages}
	sv := reflects.StructOf(value)
	return sv.VisitFields(func(fv reflect.Value, fi *reflect.StructField) error {
		rules, err := v.parseRules(fi.Tag.Get(key))
		if err != nil {
			return err
		}

		if len(rules) == 0 {
			fv = reflects.Indirect(fv)
			if fv.Kind() == reflect.Struct && fv.IsValid() {
				return v.Validate(fv.Interface())
			}
			return nil
		}

		ctx.Value, ctx.Info = fv, fi
		for name, info := range rules {
			if r := v.getRule(name); r != nil {
				if err = r(ctx, &info); err != nil {
					return &Error{Field: fi.Name, Rule: name, cause: err}
				}
			} else {
				return errors.New("unknown rule: " + name)
			}
		}
		return nil
	})
}
541355
func (binaryStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	// TODO: validate
	return nil
}
488733
func (m *HealthCheckEjectUnhealthy) Validate() error {
	if m == nil {
		return nil
	}

	if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok {
		return HealthCheckEjectUnhealthyValidationError{
			field:  "FailureType",
			reason: "value must be one of the defined enum values",
		}
	}

	return nil
}
232820
func Validate(validators ...Validatable) error {
	for i := range validators {
		if err := validators[i](); err != nil {
			return err
		}
	}
	return nil
}
787644
func (d *defaultValidator) Validate() (errs *Result) {
	errs = new(Result)
	if d == nil || d.SpecValidator == nil {
		return errs
	}
	d.resetVisited()
	errs.Merge(d.validateDefaultValueValidAgainstSchema()) // error -
	return errs
}
1307034
func (t SimpleType) Validate() error {
	if !t.Kind.IsSimpleType() {
		return errs.New("a simple type can only have a simple type (e.g. no list or enum)")
	}
	_, err := t.SetDefaultValue(t.DefaultValue)
	if err != nil {
		return errs.Wrapf(err, "failed to validate default value for kind %s: %+v (%[1]T)", t.Kind, t.DefaultValue)
	}
	return nil
}
1124467
func (c *ChannelsCreateCall) Validate(validate bool) *ChannelsCreateCall {
	c.validate = validate
	return c
}
670203
func (*FloatSchema) Validate(v reflect.Value) bool {
	return reflect.TypeOf(dereference(v).Interface()).Kind() == reflect.Float32
}
412806
func (k *Key) Validate(fn func(string) string) string {
	return fn(k.String())
}
45658
func (s *StringRule) Validate(cv ctypes.ConfigValue) error {
	// Check that type is correct
	if cv.Type() != StringType {
		return wrongType(s.key, cv.Type(), StringType)
	}
	return nil
}
166529
func (m *Pet) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateCategory(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateName(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePhotoUrls(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTags(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
137511
func (m *Error) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateCode(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateHelpURL(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateMessage(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
556336
func (c Code) Validate(_ interface{}) error {
	if codeRegex.Match([]byte(c)) {
		return nil
	}

	return errInvalidCode
}
87078
func (s *UnionSchema) Validate(v reflect.Value) bool {
	v = dereference(v)
	for i := range s.Types {
		if t := s.Types[i]; t.Validate(v) {
			return true
		}
	}

	return false
}