awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

JavaScript Validation Libraries

排名更新于 2026年7月13日

For a lightweight validation library for JavaScript, the strongest matches are ianstormtaylor/superstruct (Superstruct is a robust, TypeScript-first library that provides schema-based), jquense/yup (Yup is a comprehensive, TypeScript-first schema validation library that) and colinhacks/zod (Zod is a comprehensive, TypeScript-first schema validation library that). hapijs/joi and open-circle/valibot round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

我们为您精选了匹配 “best javascript validation libraries” 的开源 GitHub 仓库。结果按与您查询的相关性进行排名 — 您可以使用下方筛选器缩小范围,或通过 AI 进行优化。

JavaScript Validation Libraries

用 AI 发现最棒的仓库。我们将通过 AI 为您搜索最匹配的仓库。
  • ianstormtaylor/superstructianstormtaylor 的头像

    ianstormtaylor/superstruct

    7,141在 GitHub 上查看↗

    Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions. The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures. Its capabilities cover the validatio

    Superstruct is a robust, TypeScript-first library that provides schema-based validation, custom rules, and data coercion, making it a comprehensive solution for runtime data enforcement in both Node.js and browser environments.

    TypeScriptSchema ValidationType-Safe Schema ValidationsCustom Validators
    在 GitHub 上查看↗7,141
  • jquense/yupjquense 的头像

    jquense/yup

    23,673在 GitHub 上查看↗

    Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def

    Yup is a comprehensive, TypeScript-first schema validation library that provides robust support for custom rules, asynchronous validation, and data transformation, making it a standard choice for enforcing data shapes in both browser and Node.js environments.

    TypeScriptCustom Validation RulesData Validation SchemasSchema Validation
    在 GitHub 上查看↗23,673
  • colinhacks/zodcolinhacks 的头像

    colinhacks/zod

    43,036在 GitHub 上查看↗

    Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It functions as a runtime type guard, allowing developers to define complex data structures through a declarative, chainable syntax. By using these schema definitions, the library automatically derives static TypeScript types, eliminating the need for manual type duplication and ensuring that runtime data matches expected application contracts. The library distinguishes itself through functional schema composition, which enables the creation of hierarchical structures by nesting a

    Zod is a comprehensive, TypeScript-first schema validation library that provides robust runtime type checking, custom validation logic, and seamless integration across both browser and Node.js environments.

    TypeScriptData Validation SchemasValidation Error HandlersValidation Error Formatters
    在 GitHub 上查看↗43,036
  • hapijs/joihapijs 的头像

    hapijs/joi

    21,192在 GitHub 上查看↗

    Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application. The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the

    Joi is a comprehensive, industry-standard schema validation library that provides robust support for custom rules, asynchronous validation, and data sanitization in both Node.js and browser environments.

    JavaScriptCustom Validation RulesData Validation SchemasCustom Validation Extensions
    在 GitHub 上查看↗21,192
  • open-circle/valibotopen-circle 的头像

    open-circle/valibot

    8,769在 GitHub 上查看↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    Valibot is a modular, schema-based validation library that provides robust TypeScript support, runtime type inference, and extensive validation utilities for both browser and Node.js environments.

    TypeScriptCustom Validation RulesData Validation SchemasSchema Validation
    在 GitHub 上查看↗8,769
  • ajv-validator/ajvajv-validator 的头像

    ajv-validator/ajv

    14,733在 GitHub 上查看↗

    Ajv is a high-performance data validation framework that compiles JSON schemas into optimized, standalone JavaScript functions. By transforming declarative schema definitions into executable code, it eliminates runtime interpretation overhead and provides a secure, efficient way to enforce data integrity across both browser and server environments. The library distinguishes itself through its focus on performance and type safety. It employs advanced compilation techniques, including abstract syntax tree optimization and function caching, to ensure rapid validation. Beyond standard checks, it

    Ajv is a high-performance, schema-based validation library that provides robust TypeScript support, asynchronous validation, and custom rule capabilities, making it a flagship tool for enforcing data integrity in both Node.js and browser environments.

    TypeScriptCustom Validation RulesData Validation SchemasType-Safe Schema Validations
    在 GitHub 上查看↗14,733
  • sideway/joisideway 的头像

    sideway/joi

    21,192在 GitHub 上查看↗

    Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects remain consistent. It functions as a schema-based validator and object schema definition tool, preventing invalid information from entering an application by checking data against predefined constraints and rules. The library employs a chainable fluent interface and a constraint-based validation engine to build complex validation pipelines. It utilizes recursive tree traversal to validate nested data structures and a type-coercion pipeline to transform input values into the t

    Joi is a comprehensive, industry-standard schema validation library that provides a fluent API for defining complex constraints, full TypeScript support, and robust handling for both synchronous and asynchronous validation across Node.js and browser environments.

    JavaScriptData Validation Schemas
    在 GitHub 上查看↗21,192
  • typestack/class-validatortypestack 的头像

    typestack/class-validator

    11,796在 GitHub 上查看↗

    class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules. The library provides a recursive validation system for checking complex data hierarchies, including nested classes and individual elements within collections. It includes an object property whitelist utility capable of stripping undocumented properties or blocking unknown field

    This library provides a robust, decorator-based approach to schema validation that fully supports TypeScript, asynchronous rules, and complex nested data structures in both Node.js and browser environments.

    TypeScriptCustom Validation Rules
    在 GitHub 上查看↗11,796
  • yiminghe/async-validatoryiminghe 的头像

    yiminghe/async-validator

    9,099在 GitHub 上查看↗

    async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex object structures and nested arrays by applying recursive rules and non-blocking, promise-based execution to ensure data integrity. The library functions as both an object constraint validator and a data transformation pipeline. It allows for the sanitization, coercion, and formatting of input values through a sequence of functions that run before and after the primary validation process. The engine covers a range of capabilities including recursive nested validation, the en

    This library provides a robust, schema-based validation engine that supports asynchronous execution, custom rules, and TypeScript, making it a direct fit for enforcing data integrity in both browser and Node.js environments.

    TypeScriptCustom Validation RulesData Validation Schemas
    在 GitHub 上查看↗9,099
  • ansman/validate.jsansman 的头像

    ansman/validate.js

    2,599在 GitHub 上查看↗

    Validate.js is a JavaScript library designed for declarative data validation and form processing. It provides a framework for verifying complex objects and individual data points against structured constraint schemas, ensuring that application state and user input meet defined requirements. The library distinguishes itself through its support for asynchronous validation, allowing for verification tasks that require external data sources or server-side checks. It includes a built-in utility for extracting and normalizing data from web forms, which cleans input by removing whitespace and empty

    Validate.js is a declarative schema-based validation library that supports asynchronous rules and works in both browser and Node.js environments, making it a solid choice for enforcing data integrity in JavaScript applications.

    JavaScriptData Validation Schemas
    在 GitHub 上查看↗2,599
  • arktypeio/arktypearktypeio 的头像

    arktypeio/arktype

    7,780在 GitHub 上查看↗

    Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida

    Arktype is a high-performance, schema-based validation library that provides deep TypeScript integration and runtime type checking, making it a robust choice for enforcing data structures in both Node.js and browser environments.

    TypeScriptInput ValidationRuntime Data ValidationRuntime Type Validation
    在 GitHub 上查看↗7,780
  • imbrn/v8nimbrn 的头像

    imbrn/v8n

    4,145在 GitHub 上查看↗

    v8n is a JavaScript data validation library used to verify that values, objects, and arrays meet specific criteria. It functions as a schema-based validator and an asynchronous validation engine, utilizing a fluent API to construct sequences of chainable rules and constraints. The framework is distinguished by its ability to execute promises and network requests during the validation process to determine if a value is valid. It allows for the creation of reusable validation schemas and provides a customizable rule framework where users can define their own logic and configure how error result

    This library provides a fluent, schema-based validation engine that supports asynchronous rules, custom logic, and cross-environment compatibility, making it a solid choice for enforcing data integrity in JavaScript applications.

    JavaScriptCustom Validation RulesData Validation Schemas
    在 GitHub 上查看↗4,145
  • guillaumepotier/parsley.jsguillaumepotier 的头像

    guillaumepotier/Parsley.js

    8,978在 GitHub 上查看↗

    Parsley.js is a JavaScript form validation library that provides a client-side data validator for verifying input correctness before submission. It functions as an HTML attribute-based validator, allowing constraints to be defined declaratively within HTML data attributes to enforce rules without requiring custom scripts. The framework distinguishes itself through a customizable validation system that supports user-defined rules and custom error message templates. It includes a remote validation interface to verify form values against server endpoints via asynchronous network requests and sup

    Parsley.js is a client-side form validation library that uses declarative HTML attributes to enforce rules, supporting custom validation logic and asynchronous remote verification for web forms.

    JavaScriptCustom Validation Rules
    在 GitHub 上查看↗8,978
  • samchon/typiasamchon 的头像

    samchon/typia

    5,837在 GitHub 上查看↗

    Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution. The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It

    Typia provides high-performance, schema-based validation by transforming TypeScript types into optimized runtime validation functions, making it a powerful tool for enforcing data integrity in both Node.js and browser environments.

    GoCustom Validation RulesSchema Validators
    在 GitHub 上查看↗5,837
  • validatorjs/validator.jsvalidatorjs 的头像

    validatorjs/validator.js

    23,744在 GitHub 上查看↗

    Validator.js is a library of pure, stateless functions designed for the validation and sanitization of string data within any JavaScript environment. It provides a modular suite of tools to verify that user-provided information conforms to specific formats, such as emails, URLs, and dates, while simultaneously cleaning untrusted input to mitigate security risks. The library distinguishes itself through a design that avoids platform-specific APIs, ensuring consistent execution across browsers, servers, and edge runtimes. By utilizing a pre-compiled regular expression engine and a pure data tra

    This library provides a robust, cross-platform suite of functions for string validation and sanitization, though it lacks the schema-based structure found in more modern object-validation frameworks.

    JavaScriptString Validation and NormalizationData Sanitization UtilitiesInput Validation Utilities
    在 GitHub 上查看↗23,744
  • vuelidate/vuelidatevuelidate 的头像

    vuelidate/vuelidate

    6,889在 GitHub 上查看↗

    Vuelidate is a model-based validation library for Vue.js applications. It functions as a client-side data validator and validation engine that decouples verification logic from the user interface by checking data models and state objects against defined rules. The system tracks field interactions and marks inputs as dirty to manage when validation messages are triggered. This approach allows the library to provide real-time user input feedback and verify model integrity before data is submitted. The framework covers form state validation, validation error rendering, and the configuration of

    Vuelidate is a model-based validation library designed specifically for Vue.js applications, providing robust schema-like validation and TypeScript support, though it is more tightly coupled to UI state management than a generic, framework-agnostic validation library.

    JavaScriptVue.js Validation LibrariesClient-Side Input ValidatorsClient-Side Input Verification
    在 GitHub 上查看↗6,889
一览前 10 名对比
仓库Star 数语言许可证最后推送
ianstormtaylor/superstruct7.1KTypeScriptMIT2024年10月1日
jquense/yup23.7KTypeScriptMIT2026年6月12日
colinhacks/zod43KTypeScriptMIT2026年6月13日
hapijs/joi21.2KJavaScriptNOASSERTION2026年6月12日
open-circle/valibot8.8KTypeScriptMIT2026年6月21日
ajv-validator/ajv14.7KTypeScriptMIT2026年5月12日
sideway/joi21.2KJavaScriptNOASSERTION2026年6月12日
typestack/class-validator11.8KTypeScriptMIT2026年3月25日
yiminghe/async-validator9.1KTypeScriptMIT2024年2月20日
ansman/validate.js2.6KJavaScriptMIT2021年12月11日

Related searches

  • a library for validating data in PHP
  • a java library for data validation
  • a data validation library for Go
  • React 表单验证库
  • a data validation library for Rust
  • TypeScript 运行时类型验证库
  • TypeScript 模式验证库
  • a lightweight logging library for JavaScript applications