百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fluentvalidation-ts

> 前端框架
开源

TypeScript - 一个用于构建强类型验证规则的库

99 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

TypeScript - 一个用于构建强类型验证规则的库

fluentvalidation-ts

Strong, simple, extensible validation.

Visit https://fluentvalidation-ts.alexpotter.dev to get started.

Overview

Front-end validation is a must-have for any project that involves forms, but the requirements vary hugely. You might have a simple sign-up form with a few text fields, or a complex configuration page with collections and deeply nested fields.

There are plenty of libraries out there which help you to solve the problem of front-end validation, but all the ones I've tried have felt lacking in one aspect or another - whether that's TypeScript support, their capacity to handle complex requirements, or the ability to define your own reusable validation logic.

So I wrote fluentvalidation-ts, a tiny library that is:

  • Designed for TypeScript
  • Simple yet powerful
  • Fully extensible

Whatever your validation needs, fluentvalidation-ts can handle them.

Docs

Full documentation, including a tutorial and a number of useful guides, is available on the documentation website.

  • Overview
  • Tutorial
  • Guides
  • Core API Reference
  • Validation Rules API Reference
  • Releases

Requirements

This library has been written in, and for, TypeScript. You can still use fluentvalidation-ts without TypeScript, but the primary benefit of having strongly-typed validation rules is lost.

If using TypeScript (strongly recommended), you must be on TypeScript version 2.9 or later.

Installation

Using NPM:

bash
npm i --save fluentvalidation-ts

Using Yarn:

bash
yarn add fluentvalidation-ts

[!TIP] There's no need to install types separately - fluentvalidation-ts has been written with first-class support for TypeScript!

Example Usage

…

Test Coverage

fluentvalidation-ts has 100% test coverage via unit tests written with Jest.

[!NOTE] Some branches are incorrectly reported as uncovered due to the following issue: https://github.com/gotwarlost/istanbul/issues/690.

Issues

Please report issues via GitHub.

License

fluentvalidation-ts is provided under the terms of an Apache-2.0 license.

Development

Clone the repo and run npm install, then run npm run watch in the root of the project to start the TypeScript compiler in watch mode. You can run the tests with npm test.

About the Author

Alex Potter is a full-stack Software Engineer, currently working as a Technical Lead at Ghyston, an award-winning software development company based in Bristol.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptfluentfluentvalidationformform-validation

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架