Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hyperform

> 前端框架
Open source

Capture form validation back from the browser

736 stars0 likes0 views
WebsiteGitHub

About

Capture form validation back from the browser

Capture form validation back from the browser

Hyperform is your one-stop solution for client-side form handling.

It features a complete implementation of the HTML5 form validation API in JavaScript, replaces the browser’s native methods (if they are even implemented…), and enriches your toolbox with custom events and hooks.

Not pumped yet? Then take a look at our awesome examples.

Installation

Embed from a CDN

Get up and running with Hyperform by embedding it from a CDN: CDNJS

xml

or unpkg.com:

xml

Install locally

The easiest way is installing via npm:

bash
npm install hyperform

or you can use Bower:

bash
bower install hyperform

or download the current version as ZIP archive.

Then embed dist/hyperform.min.js in your file:

xml

or require it in your code:

javascript
const hyperform = require('hyperform');

In old browsers you will need polyfills for the following features: WeakMap (IE 10 and lower), element.classList (IE 9 and lower), array.filter, array.every, Object.keys and Object.defineProperty (IE 8 and lower). For IE 9+ support simply add this line to use CloudFlare’s service:

xml

Usage

You can let Hyperform take over a single form:

javascript
hyperform(document.forms[0]);

or all forms, current and future ones:

javascript
hyperform(window);

Configure settings as second argument:

javascript
hyperform(window, { revalidate: 'never' });

If you only need a certain feature once, you can access it directly by name:

javascript
if (hyperform.willValidate(some_input_element)) {
    var is_valid = hyperform.validityState(some_input_element).valid;
}

The full documentation provides you with all the nitty-gritty details and tricks.

What About the UI?

You might be wondering, how to get nifty datepickers and range sliders and stuff. Unfortunately, this is out of topic for Hyperform, but despair not! Hyperform UI (beta) is here to fill in the gaps with the help of jQuery UI.

“jQuery UI? Isn’t that that thing that they had before React?” — “No, that’s Backbone.” — “But before that?” — “No, that was Kendo.” — “...?”

If you had these thoughts right now, rest assured. For the purpose of input widgets there is still close to no other library, that is complete, themable, accessible and has wide browser support. Just try it yourself!

Examples

Yes, please! The more the better.

Status

The target is 100% support for the HTML5 validation API. Currently supported:

feature status
willValidate :full_moon:
setCustomValidity(message) :full_moon:
validity.valueMissing :full_moon:
validity.typeMismatch :full_moon:
validity.patternMismatch :full_moon:
validity.tooLong :full_moon:
validity.tooShort :full_moon:
validity.rangeUnderflow :full_moon:
validity.rangeOverflow :full_moon:
validity.stepMismatch :full_moon:
validity.badInput :full_moon:
validity.customError :full_moon:
validity.valid :full_moon:
checkValidity() :full_moon:
reportValidity() :full_moon:
validationMessage :full_moon:
valueAsDate :full_moon:
valueAsNumber :full_moon:
valueLow / valueHigh :new_moon:
stepUp(n) / stepDown(n) :full_moon:
accept attribute :full_moon:
support for novalidate :full_moon:

Current test status:

Browser Support

Hyperform is fully tested and supported in

  • Chrome (latest 3)
  • Firefox (latest 3 and ESR)
  • MS Edge (latest)
  • IE down to version 9 (yes, you've read that correctly) when WeakMap for IE ≤ 10 and classList for IE 9 are polyfilled
  • Safari. Caveat: In versions ≤ 9 polyfills do not work. However, form validation and direct method calling works as expected.)

Contributing

Cool, yes! Head over to the contributing guide for details.

Changelog

We maintain an up-to date changelog named CHANGELOG.md alongside this file.

License

This library is released under the terms of the MIT license.

Contributors

Hyperform is developed by Manuel Strehl with contributions by Andrey Volynkin, Daniel Wang, Darlan Mendonça, Christoph Dörfel, Josh Farneman, Casey Corcoran, and many people reporting issues.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptes6form-validationhtml-formhtml5

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

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