// Validate validates this client
352748
func (m *Client) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

	if err := m.validateJwks(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
}
1187577
func (e Error) Validate(v interface{}) error {
	if e.Message == "" {
		return fmt.Errorf("invalid error message %q", e.Message)
	}

	if e.Code <= 0 {
		return fmt.Errorf("invalid error code %d", e.Code)
	}

	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
}
89861
func (key CredentialKey) Validate(_ interface{}) error {
	if credentialKeyRegex.Match([]byte(key)) {
		return nil
	}

	return errInvalidCredentialKey
}
820462
func (s Spec) Validate() error {
	if s.Cancel == nil {
		if !s.NoCancel {
			return errors.NotValidf("missing Cancel")
		}
	}
	if s.Worker == "" {
		return errors.NotValidf("mssing Worker")
	}
	return nil
}
521580
func (p *Browser) Validate() error {
	if p == nil {
		return ErrIncomplete
	}

	// must have both a title and body. action and url-args are optional.
	if len(p.Alert.Title) == 0 || len(p.Alert.Body) == 0 {
		return ErrIncomplete
	}
	return nil
}
1179809
func (c *Config) Validate() error {
	if c.SocketName == "" {
		return errors.NotValidf("empty SocketName")
	}
	if c.PrometheusGatherer == nil {
		return errors.NotValidf("nil PrometheusGatherer")
	}
	return nil
}
1053321
func (c *Caches) Validate() error {
	if c.RejectCacheSize < MinRejectCacheSize {
		return fmt.Errorf("reject cache size %d is less than min: %d",
			c.RejectCacheSize, MinRejectCacheSize)
	}
	if c.ChannelCacheSize < MinChannelCacheSize {
		return fmt.Errorf("channel cache size %d is less than min: %d",
			c.ChannelCacheSize, MinChannelCacheSize)
	}

	return nil
}
78131
func (s Service) Validate() error {
	var validationErrors = []error{}

	err := s.app.Validate()
	if err != nil {
		validationErrors = append(validationErrors, err)
	}

	for _, prerequisite := range s.app.Prerequisites {
		err = prerequisite.Validate()
		if err != nil {
			validationErrors = append(validationErrors, err)
		}
	}

	if len(validationErrors) == 0 {
		return nil
	}

	return errors.Errorf("snap.Service validation failed %v", validationErrors)
}
794115
func Validate(config clientcmdapi.Config) error {
	validationErrors := make([]error, 0)

	if clientcmdapi.IsConfigEmpty(&config) {
		return newErrConfigurationInvalid([]error{ErrEmptyConfig})
	}

	if len(config.CurrentContext) != 0 {
		if _, exists := config.Contexts[config.CurrentContext]; !exists {
			validationErrors = append(validationErrors, &errContextNotFound{config.CurrentContext})
		}
	}

	for contextName, context := range config.Contexts {
		validationErrors = append(validationErrors, validateContext(contextName, *context, config)...)
	}

	for authInfoName, authInfo := range config.AuthInfos {
		validationErrors = append(validationErrors, validateAuthInfo(authInfoName, *authInfo)...)
	}

	for clusterName, clusterInfo := range config.Clusters {
		validationErrors = append(validationErrors, validateClusterInfo(clusterName, *clusterInfo)...)
	}

	return newErrConfigurationInvalid(validationErrors)
}
1016848
func (key AnnotationKey) Validate(_ interface{}) error {
	if annotationKeyRegex.Match([]byte(key)) {
		return nil
	}

	return errInvalidAnnotationKey
}
116491
func (g MayuFlags) Validate() (bool, error) {
	if ok, err := g.ValidateHTTPCertificateUsage(); !ok {
		return ok, err
	}

	if ok, err := g.ValidateHTTPCertificateFileExistance(); !ok {
		return ok, err
	}

	return true, nil
}
1033058
func (m *AuthorizationResponse) Validate() error {
	if m == nil {
		return nil
	}

	{
		tmp := m.GetAllowedUpstreamHeaders()

		if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

			if err := v.Validate(); err != nil {
				return AuthorizationResponseValidationError{
					field:  "AllowedUpstreamHeaders",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}

	{
		tmp := m.GetAllowedClientHeaders()

		if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

			if err := v.Validate(); err != nil {
				return AuthorizationResponseValidationError{
					field:  "AllowedClientHeaders",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}

	return nil
}
1274640
func (m *Customer) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
432111
func (ex *exampleValidator) Validate() (errs *Result) {
	errs = new(Result)
	if ex == nil || ex.SpecValidator == nil {
		return errs
	}
	ex.resetVisited()
	errs.Merge(ex.validateExampleValueValidAgainstSchema()) // error -

	return errs
}
23602
func (ingressStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	ingress := obj.(*networking.Ingress)
	err := validation.ValidateIngress(ingress)
	return err
}