MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Validate

Method Validate

common/env/env.go:709–717  ·  view source on GitHub ↗

Validate validates the configuration of the validator object.

()

Source from the content-addressed store, hash-verified

707
708// Validate validates the configuration of the validator object.
709func (v *Validator) Validate() error {
710 if v == nil {
711 return errors.New("invalid validator: nil")
712 }
713 if v.Name == "" {
714 return errors.New("invalid validator: missing name")
715 }
716 return nil
717}
718
719// SetConfig sets the set of map key-value pairs associated with this validator's configuration.
720func (v *Validator) SetConfig(config map[string]any) *Validator {

Callers

nothing calls this directly

Calls 1

NewMethod · 0.80

Tested by

no test coverage detected