awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

JavaScript Validation Libraries

Ranking updated Jul 13, 2026

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.

We curate open-source GitHub repositories matching “best javascript validation libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.

JavaScript Validation Libraries

Find the best repos with AI.We'll search the best matching repositories with AI.
  • ianstormtaylor/superstructianstormtaylor avatar

    ianstormtaylor/superstruct

    7,141View on 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
    View on GitHub↗7,141
  • jquense/yupjquense avatar

    jquense/yup

    23,673View on 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
    View on GitHub↗23,673
  • colinhacks/zodcolinhacks avatar

    colinhacks/zod

    43,036View on 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
    View on GitHub↗43,036
  • hapijs/joihapijs avatar

    hapijs/joi

    21,192View on 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
    View on GitHub↗21,192
  • open-circle/valibotopen-circle avatar

    open-circle/valibot

    8,769View on 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
    View on GitHub↗8,769
  • ajv-validator/ajvajv-validator avatar

    ajv-validator/ajv

    14,733View on 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
    View on GitHub↗14,733
  • sideway/joisideway avatar

    sideway/joi

    21,192View on 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
    View on GitHub↗21,192
  • typestack/class-validatortypestack avatar

    typestack/class-validator

    11,796View on 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
    View on GitHub↗11,796
  • yiminghe/async-validatoryiminghe avatar

    yiminghe/async-validator

    9,099View on 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
    View on GitHub↗9,099
  • ansman/validate.jsansman avatar

    ansman/validate.js

    2,599View on 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
    View on GitHub↗2,599
  • arktypeio/arktypearktypeio avatar

    arktypeio/arktype

    7,780View on 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
    View on GitHub↗7,780
  • imbrn/v8nimbrn avatar

    imbrn/v8n

    4,145View on 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
    View on GitHub↗4,145
  • guillaumepotier/parsley.jsguillaumepotier avatar

    guillaumepotier/Parsley.js

    8,978View on 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
    View on GitHub↗8,978
  • samchon/typiasamchon avatar

    samchon/typia

    5,837View on 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
    View on GitHub↗5,837
  • validatorjs/validator.jsvalidatorjs avatar

    validatorjs/validator.js

    23,744View on 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
    View on GitHub↗23,744
  • vuelidate/vuelidatevuelidate avatar

    vuelidate/vuelidate

    6,889View on 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
    View on GitHub↗6,889
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
ianstormtaylor/superstruct7.1KTypeScriptMITOct 1, 2024
jquense/yup23.7KTypeScriptMITJun 12, 2026
colinhacks/zod43KTypeScriptMITJun 13, 2026
hapijs/joi21.2KJavaScriptNOASSERTIONJun 12, 2026
open-circle/valibot8.8KTypeScriptMITJun 21, 2026
ajv-validator/ajv14.7KTypeScriptMITMay 12, 2026
sideway/joi21.2KJavaScriptNOASSERTIONJun 12, 2026
typestack/class-validator11.8KTypeScriptMITMar 25, 2026
yiminghe/async-validator9.1KTypeScriptMITFeb 20, 2024
ansman/validate.js2.6KJavaScriptMITDec 11, 2021

Related searches

  • a library for validating data in PHP
  • a java library for data validation
  • a data validation library for Go
  • a form validation library for React
  • a data validation library for Rust
  • a runtime type validation library for TypeScript
  • a schema validation library for TypeScript
  • a lightweight logging library for JavaScript applications