yup
Installation
SKILL.md
Yup
Overview
Yup is a schema validation library for JavaScript. Define schemas declaratively, validate data, and get detailed error messages. Works with Formik, react-hook-form, and standalone. TypeScript-first with type inference.
Instructions
Step 1: Schemas
import * as yup from 'yup'
const userSchema = yup.object({
name: yup.string().min(2).max(100).required(),
email: yup.string().email().required(),
age: yup.number().positive().integer().min(13).max(120),
role: yup.string().oneOf(['admin', 'member', 'viewer']).default('member'),
tags: yup.array().of(yup.string()).min(1).max(10),
Related skills