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
Build Securely on Azure with Proven Frameworks Icon
Build Securely on Azure with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download 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