data-validation

Validate frontend and backend data with Zod and Pydantic schemas.

1|Updated Sep 14, 2025
One-click install
npx skills add https://github.com/CleanExpo/DR-NRPG --skill data-validation-cleanexpo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-validation
Source: https://github.com/CleanExpo/DR-NRPG/tree/main/.skills/custom/data-validation
Command: npx skills add https://github.com/CleanExpo/DR-NRPG --skill data-validation-cleanexpo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents invalid or malformed data from entering your system, ensuring data integrity and preventing runtime errors by enforcing strict validation at all entry points.

Core Features & Use Cases

  • Input Sanitisation: Validates user input on the frontend using Zod and API requests on the backend using Pydantic.
  • Schema Definition: Provides clear, reusable schemas for data contracts.
  • Australian-Specific Validation: Includes validators for ABN, phone numbers, postcodes, and dates in Australian formats.
  • Use Case: When a user submits a registration form, Zod validates their email format and password strength on the client-side, and Pydantic validates the incoming API request on the server-side, ensuring only clean data reaches your business logic.

Quick Start

Use the data-validation skill to create a Zod schema for a user registration form including email, password, and Australian postcode validation.

Frequently Asked Questions about data-validation

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

FAQPage Schema
How do I validate data integrity at system boundaries using Zod and Pydantic?

You enforce data integrity at system boundaries by using Zod to validate and sanitise frontend user input, and Pydantic to validate backend API requests. This ensures only clean, type-safe data reaches your business logic.

Does schema validation support Australian-specific data formats like ABN and postcodes?

Yes, schema validation includes built-in validators for Australian-specific data formats. You can validate ABN, phone numbers, postcodes, and dates in Australian formats directly within your defined Zod and Pydantic schemas.

What is the best way to manage type-safe API contracts between frontend and backend?

The best way to manage type-safe API contracts is by defining clear, reusable schemas. You create Zod schemas for client-side input and Pydantic schemas for server-side requests to enforce strict validation at all entry points.

How do I sanitise user input on a registration form before sending an API request?

You sanitise user input by applying a Zod schema on the frontend to validate fields like email format and password strength. The backend then applies Pydantic validation to the incoming API request to ensure data integrity.

Do I need specific naming conventions for frontend and backend validation components?

Yes, this data validation approach requires adherence to defined naming conventions and validation patterns. Following these conventions ensures your frontend Zod and backend Pydantic components maintain consistent data contracts.