validation

package
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package validation provides shared input validation helpers for CHIP tools. Helpers return Go errors that the MCP SDK wraps as tool execution errors (isError: true), letting the calling model see the problem and self-correct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UUID

func UUID(fieldName, value string) error

UUID verifies value is a well-formed UUID. fieldName is surfaced in the returned error so the calling model can identify which field failed.

func UUIDOptional

func UUIDOptional(fieldName, value string) error

UUIDOptional verifies value is a well-formed UUID when non-empty. Empty strings pass. Use for optional UUID fields.

func UUIDs

func UUIDs(fieldName string, values []string) error

UUIDs verifies every entry in values is a well-formed UUID. An empty slice passes. The error identifies the offending element's index.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL