·handling-validation-errors
</>

handling-validation-errors

检查、过滤和映射 z 模式验证错误以供应用程序使用。当用户需要处理验证错误、从anyOf/oneOf/not组合器中遍历嵌套内部错误、将错误代码映射到用户友好的消息、使用includeErrors或exclusiveErrors过滤错误、构建表单字段错误映射器、使用reportPathAsArray、解释SchemaErrorDetail字段(如code/path/keyword/inner)或调试验证失败的原因时使用。

36安装·0热度·@zaggino

安装

$npx skills add https://github.com/zaggino/z-schema --skill handling-validation-errors

如何安装 handling-validation-errors

通过命令行快速安装 handling-validation-errors AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/zaggino/z-schema --skill handling-validation-errors
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:zaggino/z-schema。

SKILL.md

查看原文

z-schema reports validation errors as ValidateError objects containing a .details array of SchemaErrorDetail. This skill covers inspecting, filtering, mapping, and presenting these errors.

| .name | string | Always 'z-schema validation error' | | .message | string | Summary message | | .details | SchemaErrorDetail[] | All individual errors |

| message | string | Human-readable text, e.g. "Expected type string but found type number" | | code | string | Machine-readable code, e.g. "INVALIDTYPE" | | params | (string \| number \| Array)[] | Values filling the message template placeholders | | path | string \| Array | JSON Pointer to the failing value ("#/age" or ["age"]) |

检查、过滤和映射 z 模式验证错误以供应用程序使用。当用户需要处理验证错误、从anyOf/oneOf/not组合器中遍历嵌套内部错误、将错误代码映射到用户友好的消息、使用includeErrors或exclusiveErrors过滤错误、构建表单字段错误映射器、使用reportPathAsArray、解释SchemaErrorDetail字段(如code/path/keyword/inner)或调试验证失败的原因时使用。 来源:zaggino/z-schema。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/zaggino/z-schema --skill handling-validation-errors
分类
</>开发工具
认证
收录时间
2026-02-28
更新时间
2026-03-10

Browse more skills from zaggino/z-schema

快速解答

什么是 handling-validation-errors?

检查、过滤和映射 z 模式验证错误以供应用程序使用。当用户需要处理验证错误、从anyOf/oneOf/not组合器中遍历嵌套内部错误、将错误代码映射到用户友好的消息、使用includeErrors或exclusiveErrors过滤错误、构建表单字段错误映射器、使用reportPathAsArray、解释SchemaErrorDetail字段(如code/path/keyword/inner)或调试验证失败的原因时使用。 来源:zaggino/z-schema。

如何安装 handling-validation-errors?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/zaggino/z-schema --skill handling-validation-errors 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/zaggino/z-schema