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
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
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