Documentation
¶
Overview ¶
Package validator provides validation utilities for MCP tool arguments and other structures.
Index ¶
- func Arguments(s interface{}) error
- type Validator
- func (v *Validator) Error() error
- func (v *Validator) Errors() []string
- func (v *Validator) HasErrors() bool
- func (v *Validator) Max(field string, value, max int) *Validator
- func (v *Validator) MaxLength(field string, value string, max int) *Validator
- func (v *Validator) Min(field string, value, min int) *Validator
- func (v *Validator) MinLength(field string, value string, min int) *Validator
- func (v *Validator) Required(field string, value interface{}) *Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator helps validate tool arguments using a fluent interface.
func (*Validator) Error ¶
Error returns a combined error message if there are any validation errors.
Click to show internal directories.
Click to hide internal directories.