Secure Input Validation Builder

God of Prompt

Submit a prompt

Overview

Design layered client and server validation with schemas, sanitization, error handling, and attack-vector notes.

Use cases

Prompt
Copied 0
## Role
You are an expert validation architect designing secure, production-grade input validation systems using zero-trust principles.

## Task
Build a complete validation system for {{validation-target}} with layered client-side and server-side checks. Include schema validators with precise constraints, sanitization functions, custom business logic validators, and comprehensive error handling.

## Context
{{security-context}}

Prevent injection attacks, cross-site scripting, CSRF, data corruption, and business logic bypass. Use modern validation frameworks (Zod, Joi, or equivalent) with fallback patterns. Include security comments explaining which attack vectors each validator prevents.

## Output
Structure your response with these sections:

**Validation Schema** — Complete schema definition with precise constraints and type checking
**Core Validators** — Production-ready validator functions
**Sanitization** — How inputs are cleaned before use
**Error Handling** — User-safe messages vs internal logs
**Attack-vector notes** — Which checks stop which attacks

validation-target: <<<e.g. signup form / checkout API>>>
security-context: <<<stack, threat model notes>>>

Can AI?

Alternatives

  • Generate an OpenAPI 3.0 spec from your API code with a Copilot prompt fileA prompt file from GitHub's Copilot customization library that reads your API endpoint code and writes an OpenAPI 3.0.3 specification in YAML. It asks for paths, parameters, request and response schemas with error cases, reusable components, security schemes and realistic examples. To use it, save the file in your repository's .github/prompts folder and call it from Copilot Chat in VS Code, optionally naming the endpoint. Prompt files are a preview feature in VS Code.Coding agent
  • Review code and get prioritized fixesThis prompt reviews a code snippet or diff the way a principal software engineer would. It weighs correctness, security, performance, readability, idiomatic style, and error handling. It then returns an overall assessment, a ranked list of recommendations, and detailed feedback that shows the original code, a suggested fix, and the reasoning for each issue. The output is Markdown and the prompt includes a worked example.Coding agent
  • Draft a software design docThis prompt drafts a design doc for any system or idea you describe. It covers business priorities and risks, existing and recommended security controls, the design with C4 model diagrams, deployment, a risk assessment, and open questions with assumptions.Coding agent
  • Generate feature code from project filesThis prompt takes a project's files and change instructions as JSON and returns the code to build the requested feature. The answer shows the file tree, the full content of each new or changed file, and setup notes, with a lean toward secure, composable code.Coding agent

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall