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

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

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

imbrn/v8n

0
View on GitHub↗
4,145 星标·105 分支·JavaScript·MIT·6 次浏览imbrn.github.io/v8n↗

V8n

v8n 是一款 JavaScript 数据验证库,用于验证值、对象和数组是否符合特定标准。它作为一个基于模式的验证器和异步验证引擎,利用流畅的 API 构建可链式调用的规则和约束序列。

该框架因其能够在验证过程中执行 Promise 和网络请求以确定值是否有效而脱颖而出。它允许创建可重用的验证模式,并提供了一个可自定义的规则框架,用户可以在其中定义自己的逻辑并配置如何返回错误结果。

该库涵盖了广泛的验证功能,包括针对原始类型和原型的数据类型验证、通过正则表达式和字符集的字符串内容验证,以及数值约束。它还支持复杂的对象验证、集合和数组元素验证,以及用于反转规则或处理可选值的条件逻辑。

该系统专为详细的错误收集而设计,根据每个定义的规则评估值,以收集完整的失败列表,而不是在第一个错误处停止。

Features

  • Fluent Validation Rules - Ships a fluent API that allows developers to construct validation pipelines through a sequence of chainable methods.
  • JavaScript Schema Validation - Provides a library to verify complex JavaScript object structures against defined rules and constraints.
  • Data Validation Libraries - Functions as a tool for parsing and validating JavaScript data structures against predefined schemas.
  • Asynchronous Validators - Provides mechanisms for asynchronous validation checks that require external API calls or database lookups.
  • Asynchronous Validation Pipelines - Supports asynchronous validation rules that execute promises, enabling network requests and database lookups during the verification process.
  • Asynchronous Validation Engines - Implements a non-blocking engine that processes complex object structures using recursive rules and promises.
  • Asynchronous Validators - Supports custom validation rules that return promises for performing asynchronous external lookups.
  • Customizable Validation Frameworks - Provides a framework for creating user-defined validation logic and configuring how error results are returned.
  • Data Type Validation - Checks if a value matches a specific type or prototype constructor to ensure data conforms to expected structures.
  • Collection Constraints - Includes checks for the length of arrays or strings and verifies if they contain specific required items.
  • Element-Level Validation - Provides capabilities to ensure that individual elements within a collection satisfy specific validation rules.
  • Object Structure Validations - Provides capabilities to verify that objects conform to specific key-value patterns and strictly manage unauthorized properties.
  • Strict Object Validation - Ensures objects conform to specific key-validation pairs and supports strict property checking.
  • Cumulative Error Collection - Implements a validation engine that gathers all failures in a rule chain instead of short-circuiting after the first error.
  • Numeric Constraint Validation - Verifies numeric constraints including integer status, positivity, parity, and specific range boundaries.
  • Chainable Validation APIs - Uses a chainable API pattern to declaratively specify multiple validation rules and sanitizers.
  • Schema Composition Libraries - Provides a compositional approach to building complex validation structures by nesting and chaining reusable schema primitives.
  • String Content Constraints - Verifies string properties such as case, character sets, regex patterns, and specific start or end characters.
  • Reusable Data Schemas - Allows for the creation of reusable validation schemas to maintain consistent data constraints across applications.
  • Custom Validation Rules - Offers a framework for extending the library with user-defined validation logic via a chainable interface.
  • Data Validation Schemas - Allows exporting pre-configured validation chains as reusable modules to maintain consistent constraints.
  • Error Handling Strategies - Implements configurable strategies for how validation results are returned to the application.
  • Dynamic Type Checking - Determines the data type of a value at runtime using prototypes and native types to drive validation logic.
  • Validation Control Flow - Provides conditional logic to invert rule results, handle optional values, or require at least one passing validation.
  • Validation Output Modes - Allows switching the validation output mode between boolean values, detailed error lists, or thrown exceptions.
  • Data Validation - Fluent JavaScript validation library.

Star 历史

imbrn/v8n 的 Star 历史图表imbrn/v8n 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

V8n 的开源替代方案

相似的开源项目,按与 V8n 的功能重合度排序。
  • 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.

    TypeScriptbundle-sizemodularparsing
    在 GitHub 上查看↗8,769
  • 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

    TypeScript
    在 GitHub 上查看↗9,099
  • 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

    TypeScript
    在 GitHub 上查看↗23,673
  • 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

    JavaScripthapijavascriptschema
    在 GitHub 上查看↗21,192
查看 V8n 的所有 30 个替代方案→

常见问题解答

imbrn/v8n 是做什么的?

v8n 是一款 JavaScript 数据验证库,用于验证值、对象和数组是否符合特定标准。它作为一个基于模式的验证器和异步验证引擎,利用流畅的 API 构建可链式调用的规则和约束序列。

imbrn/v8n 的主要功能有哪些?

imbrn/v8n 的主要功能包括:Fluent Validation Rules, JavaScript Schema Validation, Data Validation Libraries, Asynchronous Validators, Asynchronous Validation Pipelines, Asynchronous Validation Engines, Customizable Validation Frameworks, Data Type Validation。

imbrn/v8n 有哪些开源替代品?

imbrn/v8n 的开源替代品包括: open-circle/valibot — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments. yiminghe/async-validator — async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex… jquense/yup — Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as… hapijs/joi — Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It… meteor-community-packages/meteor-simple-schema — This library provides a comprehensive system for defining data schemas and enforcing structural integrity within… ianstormtaylor/superstruct — Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined…