TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: CBX – vanillaJS library for flexible form validation (& more)

1 点作者 morphles大约 1 年前

1 comment

morphles大约 1 年前
I have create a small and flexible library for doing form flexible validation without writing much (with luck any JS). It's based on idea I had implemented in my past work, and it worked quite neatly IMO. Instead of binding constraints to fields, we instead "bind them to messages", this means constrains are not restricted to "span" single field, as well as allowing more flexibility in placement and styling. Also && of constraints flows naturally from implementation, thus you have more complex constraints just by nesting your html tags.