Validator represents a named validator with an optional map-based configuration object. Note: the map-keys must directly correspond to the internal representation of the original validator, and should only use primitive scalar types as values at this time.
| 701 | // Note: the map-keys must directly correspond to the internal representation of the original |
| 702 | // validator, and should only use primitive scalar types as values at this time. |
| 703 | type Validator struct { |
| 704 | Name string `yaml:"name" json:"name"` |
| 705 | Config map[string]any `yaml:"config,omitempty" json:"config,omitempty"` |
| 706 | } |
| 707 | |
| 708 | // Validate validates the configuration of the validator object. |
| 709 | func (v *Validator) Validate() error { |