global-validation

dpietersz 的头像作者 dpietersz

应用输入验证最佳实践,包括服务器端验证、早期失败、特定错误消息和输入净化。在n8n节点中验证用户输入、实现参数验证、检查数据类型和格式、净化输入以防止注入攻击或编写业务规则验证时使用此技能。处理API端点、表单输入或n8n节点开发中的任何数据入口点时应用。

📖 中文导读:应用输入验证最佳实践,包括服务器端验证、早期失败、特定错误消息和输入净化。在n8n节点中验证用户输入、实现参数验证、检查数据类型和格式、净化输入以防止注入攻击或编写业务规则验证时使用此技能。处理API端点、表单输入或n8n节点开发中的任何数据入口点时应用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Global Validation description: Apply input validation best practices including server-side validation, early failure, specific error messages, and input sanitization. Use this skill when validating user input in n8n nodes, implementing parameter validation, checking data types and formats, sanitizing input to prevent injection attacks, or writing business rule validation. Apply when handling API endpoints, form inputs, or any data entry points in n8n node development.

When to use this skill:

  • When validating node parameters in execute methods
  • When checking required fields and data types
  • When validating email, URL, or other format patterns
  • When sanitizing user input to prevent injection attacks
  • When implementing allowlists for valid input values
  • When writing specific, field-level error messages
  • When validating business rules (dates, ranges, balances)
  • When ensuring consistent validation across multiple entry points
  • When deciding where to place validation logic
  • When balancing client-side UX with server-side security
  • When failing early on invalid data before processing

Global Validation

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global validation.

Instructions

For details, refer to the information provided in this file: global validation