qmetrics.net

Yup

Runtime object schema validation for JavaScript

Yup builds schemas that parse, coerce, and validate values at runtime. Chained methods express required fields, types, conditional rules, and custom tests with structured errors.

Overview

Yup is a schema builder for checking and shaping data as applications run. You define a schema once, then validate inputs, cast unknown values to expected types, or run strict checks on already-parsed data without extra coercion.

Schemas combine transforms that pipeline values through type parsing and optional normalizers with tests that assert business rules transforms cannot represent. Built-in types cover strings, numbers, booleans, dates, arrays, tuples, and nested objects, each with common constraints such as length, format, and range checks.

Objects can be composed, picked, omitted, and extended immutably because each method returns a new schema instance. Conditional branches via when clauses model interdependent fields, and async validation hooks suit client and server flows alike.

TypeScript users can infer output types from schemas or constrain schemas to match existing interfaces. Errors surface as detailed validation error objects suitable for localization helpers, and the library aligns with the Standard Schema interface for interoperability.

Key features

  • Chainable schema definitions
  • Parse transforms and assertion tests
  • Async validate and isValid helpers
  • TypeScript type inference support
  • Conditional when branches
  • Immutable composable schemas
  • Custom methods and locales
  • Standard Schema compatibility

Use cases

  • HTML form field validation
  • API request body checking
  • Config or env parsing
  • Nested object shape guards
  • Shared client-server rules

Similar software

react-jsonschema-form

React form builder driven by JSON Schema

react-jsonschema-form renders web forms from JSON Schema and optional UI Schema in React. Theme packages cover Material UI, Ant Design, Bootstrap, Chakra, and other design systems.

★ 15.9k⟳ yesterdayApache-2.0
Forms & SurveysDesktop/CLI app

Bootstrap File Input

Bootstrap-styled HTML5 file picker and upload plugin

bootstrap-fileinput upgrades file inputs for Bootstrap 3–5 with previews, multi-select, AJAX uploads, and drag-and-drop.

★ 5.3k⟳ 6 months agoBSD-2-Clause
Forms & SurveysDesktop/CLI app

Django Crispy Forms

Programmatic layout-driven Django form rendering

django-crispy-forms renders Django forms with a |crispy filter and {% crispy %} tag, using helpers and layouts instead of hand-written HTML templates.

★ 5.1k⟳ 20 days agoMIT
Forms & SurveysDesktop/CLI app

Formio.js

Plain JavaScript JSON form renderer and Form.io SDK

Formio.js renders JSON schema forms in web apps with vanilla JavaScript and talks to Form.io APIs. It includes a builder, renderer, embed helper, and SDK.

★ 2.1k⟳ 1 month agoMIT
Forms & SurveysDesktop/CLI app

Laravel Form Builder

Symfony-inspired form builder for Laravel

A Laravel package that builds reusable HTML forms with validation, inspired by Symfony and Bootstrap 3 by default.

★ 1.7k⟳ 3 months agoMIT
Forms & SurveysDesktop/CLI app

Flutter Form Builder

Flutter form builder with ready-made input fields

Flutter Form Builder reduces boilerplate when building data collection forms in Flutter. It bundles validation hooks, change handling, and many prebuilt field widgets.

★ 1.6k⟳ 3 months agoMIT
Forms & SurveysDesktop/CLI app