Global Validation

Standardize and secure input validation across forms, APIs, and background processes.

Updated Oct 31, 2025
One-click install
npx skills add https://github.com/FlorianRiquelme/statamic-assets --skill global-validation-florianriquelme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Validation
Source: https://github.com/FlorianRiquelme/statamic-assets/tree/main/.claude/skills/global-validation
Command: npx skills add https://github.com/FlorianRiquelme/statamic-assets --skill global-validation-florianriquelme

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill protects applications from invalid or malicious input by enforcing comprehensive validation and sanitization, preventing security vulnerabilities, data integrity issues, and improving user experience.

Core Features & Use Cases

  • Multi-Layered Validation: Combines client-side validation for immediate user feedback with robust server-side validation for security.
  • Security & Integrity: Prevents injection attacks (SQL, XSS) and ensures data correctness through allowlists and type/format checks.
  • Use Case: When a user submits a form, this skill ensures both client-side feedback and robust server-side validation, sanitizing inputs and preventing common attacks like XSS or SQL injection, while providing specific field-level error messages.

Quick Start

Implement server-side validation rules for a user registration form, including email format, password strength, and unique username checks.

Frequently Asked Questions about Global Validation

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

FAQPage Schema
How do I validate user input to prevent SQL injection and XSS attacks?

Input validation prevents injection attacks by enforcing allowlists, sanitizing data, and type-checking user submissions. Server-side validation blocks malicious payloads before they reach your database or frontend, while client-side validation provides immediate user feedback. Apply validation rules consistently across forms, APIs, and background processes to stop XSS and SQL injection at the entry point.

What's the best way to standardize validation rules across forms, APIs, and background jobs?

Standardize validation by defining centralized rules that apply consistently to all input sources—web forms, API endpoints, and background processes. This approach ensures uniform security policies, reduces code duplication, and makes validation logic easier to maintain and audit across your entire application.

Can I use client-side validation alone, or do I need server-side validation too?

Client-side validation improves user experience with instant feedback, but server-side validation is mandatory for security. Always combine both: client-side catches typos early, server-side enforces rules that cannot be bypassed. Attackers can skip client-side checks, so server-side validation is your actual security layer.

How do I implement field-level validation error messages that users can act on?

Field-level validation error messages provide specific, actionable feedback for each input—for example, 'Password must contain at least 8 characters and one uppercase letter.' Clear error messages improve user experience by showing exactly what went wrong and how to fix it, reducing form abandonment.

What input sanitization techniques prevent common web vulnerabilities?

Input sanitization removes or escapes dangerous characters and patterns that could execute malicious code. Use allowlists to accept only expected formats, escape special characters for the target context, and strip HTML tags from user text. Sanitization combined with type and format validation blocks XSS, SQL injection, and command injection attacks.

Do I need to validate data in background jobs the same way as API requests?

Yes, background jobs process user-submitted data and face the same injection and integrity risks as APIs. Apply the same validation rules, allowlists, and sanitization to background job inputs to maintain consistent security and data integrity across all entry points.