Yup
github.com
3
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Yup is a schema builder for runtime value parsing and validation in JavaScript, created by Jason Quense. It provides a fluent, chainable API for defining object schemas that validate, transform, and cast input data, making it one of the most popular validation libraries in the React and Node.js ecosystems with over 23,000 GitHub stars. Yup schemas support a wide range of primitive types including strings, numbers, booleans, dates, arrays, and objects, each with dozens of built-in validation rules such as min, max, email, url, matches, and oneOf. The library's powerful TypeScript integration automatically infers output types from schema definitions, eliminating the need to manually write redundant type declarations. Validation in Yup is fully asynchronous, allowing rules to incorporate network requests, database lookups, or other side effects. Schemas support conditional validation with when clauses, reference resolution across fields using ref, and transformation pipelines that convert input values before validation runs. The error system produces detailed, structured validation errors with paths, messages, and type information, making it easy to map errors back to specific form fields. Yup is compatible with the Standard Schema specification, enabling interoperability with other validation libraries and frameworks. The library integrates seamlessly with form libraries like Formik and React Hook Form, and supports custom test functions, custom type casting, and schema composition through lazy evaluation and concatenation. Released under the MIT license, Yup is maintained as an open source project with active community contributions and comprehensive documentation.
Statistics
3
Views
0
Clicks
0
Like
0
Dislike