Global Validation

Enforce server-side input validation with allowlists, type checks, and sanitization.

Updated Aug 11, 2023
One-click install
npx skills add https://github.com/EIS-ITS/vss-cli --skill global-validation-eis-its
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: Global Validation
Source: https://github.com/EIS-ITS/vss-cli/tree/main/.claude/skills/global-validation
Command: npx skills add https://github.com/EIS-ITS/vss-cli --skill global-validation-eis-its

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents security vulnerabilities, data corruption, and application errors that arise from unvalidated input. It ensures all external data is rigorously validated, sanitized, and checked against business rules, protecting your system and providing clear user feedback.

Core Features & Use Cases

  • Server-Side Security: Implement allowlists and input sanitization to prevent injection attacks.
  • Data Integrity: Enforce type checking, format validation, and business rules for all incoming data.
  • User Feedback: Provide consistent, clear validation error messages for a better user experience.
  • Use Case: When a user submits a registration form, use this skill to validate email format, password strength, and ensure all required fields are present on the server-side, preventing invalid or malicious data from entering the system.

Quick Start

Add comprehensive server-side validation to the attached API endpoint for user registration, ensuring email format, password strength, and required fields are checked.

Frequently Asked Questions about Global Validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate form input on the server side to prevent security attacks?โ–ผ

Server-side validation using allowlists and input sanitization blocks injection attacks and malicious data before processing. Implement type checking, format validation, and sanitization rules for all external input to ensure only safe, expected data enters your system.

What's the best way to check data integrity across API requests and form submissions?โ–ผ

Enforce consistent validation across all entry points: validate data types, formats, and ranges against business rules; check required fields; and sanitize input to remove harmful characters. Apply the same rules server-side for both API and form requests to guarantee data integrity.

How do I provide clear error messages when user input fails validation?โ–ผ

Return standardized, user-facing error messages that explain what failed and why without exposing system details. Consistent error messaging improves user experience and helps users correct invalid input on first attempt.

Do I need to validate on both client and server, or is one enough?โ–ผ

Server-side validation is mandatory for security; client-side validation enhances user experience but can be bypassed. Always enforce validation on the server to prevent invalid or malicious data from entering your system, regardless of client-side checks.

What input sanitization techniques prevent injection attacks in forms and APIs?โ–ผ

Input sanitization removes or escapes potentially harmful characters and patterns that could enable injection attacks. Use allowlists to accept only expected characters and formats, and encode or strip dangerous sequences before storing or processing data.

When should I apply business-rule validation beyond basic type and format checks?โ–ผ

Apply business-rule validation after type and format checks pass to enforce domain-specific constraints: password strength requirements, duplicate prevention, range limits, or conditional logic. This ensures data conforms to application requirements, not just data types.