Validator in js

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • ajv

    The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)

  • Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/

  • joi

    Discontinued The most powerful data validation library for JS [Moved to: https://github.com/hapijs/joi]

  • Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Yup

    Dead simple Object schema validation

  • Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/

  • class-validator

    Decorator-based property validation for classes.

  • Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts