Yup is a JavaScript schema builder for value parsing and validation. Define a schema, transform a value to match, validate the shape of an existing value, or both. Yup schema are extremely expressive and allow modeling complex, interdependent validations, or value transformations. Yup's API is heavily inspired by Joi, but leaner and built with client-side validation as its primary use-case. Yup separates the parsing and validating functions into separate steps. cast() transforms data while validate checks that the input is the correct shape. Each can be performed together (such as HTML form validation) or seperately (such as deserializing trusted data from APIs). Yup always relies on the Promise global object to handle asynchronous values as well as Set and Map. For browsers that do not support these, you'll need to include a polyfill, such as core-js.

Features

  • You define and create schema objects
  • Schema objects are immutable, so each call of a method returns a new schema object
  • When using es module syntax, yup exports everything as a named export
  • The exported functions are factory methods for constructing schema instances
  • Using a custom locale dictionary allows you to customize the default messages used by Yup
  • If you need multi-language support, Yup has got you covered

Project Samples

Project Activity

See All Activity >

Categories

Build Tools

License

MIT License

Follow Yup

Yup Web Site

Other Useful Business Software
Catch Bugs Before Your Customers Do Icon
Catch Bugs Before Your Customers Do

Real-time error alerts, performance insights, and anomaly detection across your full stack. Free 30-day trial.

Move from alert to fix before users notice. AppSignal monitors errors, performance bottlenecks, host health, and uptime—all from one dashboard. Instant notifications on deployments, anomaly triggers for memory spikes or error surges, and seamless log management. Works out of the box with Rails, Django, Express, Phoenix, Next.js, and dozens more. Starts at $23/month with no hidden fees.
Try AppSignal Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Yup!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Build Tools

Registered

2021-04-30