---
title: Plugin Validator
description: Plugin Validator protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

Plugin Validator Protocol

Zod schemas for plugin validation data structures.

These schemas align with the IPluginValidator contract interface.

Following ObjectStack "Zod First" principle - all data structures

must have Zod schemas for runtime validation and JSON Schema generation.

<Callout type="info">
**Source:** `packages/spec/src/kernel/plugin-validator.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { PluginMetadata, ValidationError, ValidationResult, ValidationWarning } from '@objectstack/spec/kernel';
import type { PluginMetadata, ValidationError, ValidationResult, ValidationWarning } from '@objectstack/spec/kernel';

// Validate data
const result = PluginMetadata.parse(data);
```

---

## PluginMetadata

Plugin metadata for validation

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Unique plugin identifier |
| **version** | `string` | optional | Semantic version (e.g., 1.0.0) |
| **dependencies** | `string[]` | optional | Array of plugin names this plugin depends on |
| **signature** | `string` | optional | Cryptographic signature for plugin verification |


---

## ValidationError

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **field** | `string` | ✅ | Field name that failed validation |
| **message** | `string` | ✅ | Human-readable error message |
| **code** | `string` | optional | Machine-readable error code |


---

## ValidationResult

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **valid** | `boolean` | ✅ | Whether the plugin passed validation |
| **errors** | `Object[]` | optional | Validation errors |
| **warnings** | `Object[]` | optional | Validation warnings |


---

## ValidationWarning

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **field** | `string` | ✅ | Field name with warning |
| **message** | `string` | ✅ | Human-readable warning message |
| **code** | `string` | optional | Machine-readable warning code |


---

