yup

Validate form data against declarative Yup schemas in React forms.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/eralvarez/react-csr-template --skill yup-eralvarez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yup
Source: https://github.com/eralvarez/react-csr-template/tree/main/.agents/skills/yup
Command: npx skills add https://github.com/eralvarez/react-csr-template --skill yup-eralvarez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validates form data against a declarative Yup schema to ensure inputs meet required formats and constraints, reducing runtime errors and improving user feedback.

Core Features & Use Cases

  • Declarative schema-based validation for strings, numbers, dates, arrays, and objects.
  • Tight integration with Formik and React Hook Form for real-time validation and error messages.
  • Supports conditional validation, data transformation, and localization to adapt to complex forms.

Quick Start

Create a Yup object schema for your form and call validate on submit to enforce data correctness.

Frequently Asked Questions about yup

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

FAQPage Schema
How do I validate React form data using a declarative schema?

You can validate React form data by defining a declarative Yup object schema for your inputs and calling validate on submit to enforce constraints, reducing runtime errors and improving user feedback.

Can I use Yup schema validation with Formik and React Hook Form?

Yes, Yup integrates tightly with Formik and React Hook Form to enforce type-safe validation rules and display error messaging across form inputs in real-time.

What types of form inputs can I validate with a Yup schema?

A Yup schema validates object shapes, strings, numbers, dates, and arrays, while also supporting conditional validation rules, data transforms, casts, and localization for complex forms.

How do I set up conditional validation rules for complex forms?

You set up conditional validation rules declaratively within a Yup schema, allowing you to enforce constraints dynamically based on other input values across complex React forms.

Does Yup form validation support data transformation and localization?

Yes, Yup form validation supports data transformation, casts, and localization, allowing you to adapt schema constraints and error messaging to different languages and input formats.

What is the best way to enforce type-safe validation in TypeScript React forms?

Using a declarative Yup schema integrated with Formik or React Hook Form is an effective way to enforce type-safe validation and catch formatting errors in TypeScript React forms.