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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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