html5 style form validations also where not supported by the browser
Last updated 8 years ago by spaghetticode .
Repository · Original npm · Tarball · package.json
$ cnpm install html5-form-validations 
SYNC missed versions from official npm registry.

html5 form validations

Build Status

This library aims to be a simple way to add some kind of client-side validations to form elements.

It uses the html5 validations syntax, which means that if the browser if html5 validations capable this library will do basically nothing, otherwise it will handle validations.

At the moment it supports the following html5 validations: required, pattern, email, url. More can be added easily, but I am not needing them right now.

You can customize the behaviour when errors are found by the library extending Validator.manageErorrs() method. By default it just alerts the user with a list of errors, which is not that nice ;-)


Run in terminal:

  npm install html5-form-validations


Run in terminal:

  npm test


See example.html for a basic use case.

Current Tags

  • 0.0.1                                ...           latest (8 years ago)

2 Versions

  • 0.0.1                                ...           8 years ago
  • 0.0.0                                ...           8 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2016 © |