All Projects → via-profit → js-form-validator

via-profit / js-form-validator

Licence: other
Javascript form validation. Pure JS. No jQuery

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to js-form-validator

datalize
Parameter, query, form data validation and filtering for NodeJS.
Stars: ✭ 55 (+44.74%)
Mutual labels:  validation, validator
python-valid8
Yet another validation lib ;). Provides tools for general-purpose variable validation, function inputs/outputs validation as well as class fields validation. All entry points raise consistent ValidationError including all contextual details, with dynamic inheritance of ValueError/TypeError as appropriate.
Stars: ✭ 24 (-36.84%)
Mutual labels:  validation, validator
openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (+23.68%)
Mutual labels:  validation, validator
Maat
Validation and transformation library powered by deductive ascending parser. Made to be extended for any kind of project.
Stars: ✭ 27 (-28.95%)
Mutual labels:  validation, validator
checker
Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.
Stars: ✭ 62 (+63.16%)
Mutual labels:  validation, validator
pyvaru
Rule based data validation library for python 3.
Stars: ✭ 17 (-55.26%)
Mutual labels:  validation, validator
verum-php
Server-Side Validation Library for PHP
Stars: ✭ 17 (-55.26%)
Mutual labels:  validation, validator
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (+28.95%)
Mutual labels:  forms, validator
valid8
Valid8 - Super Simple Bootstrap Form Valiation
Stars: ✭ 17 (-55.26%)
Mutual labels:  validation, forms
NZ-Bank-Account-Validator
A small, zero dependency NZ bank account validation library that runs everywhere.
Stars: ✭ 15 (-60.53%)
Mutual labels:  validation, validator
openui5-validator
A library to validate OpenUI5 fields
Stars: ✭ 17 (-55.26%)
Mutual labels:  validation, validator
validation
Validation on Laravel 5.X|6.X|7.X|8.X
Stars: ✭ 26 (-31.58%)
Mutual labels:  validation, validator
node-input-validator
Validation library for node.js
Stars: ✭ 74 (+94.74%)
Mutual labels:  validation, validator
filter
Go语言的数据过滤包,由 数据输入、格式化、校验、输出 几个部份组成。
Stars: ✭ 22 (-42.11%)
Mutual labels:  validation, validator
validation
Aplus Framework Validation Library
Stars: ✭ 99 (+160.53%)
Mutual labels:  validation, validator
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-55.26%)
Mutual labels:  validation, validator
Validr
A simple, fast, extensible python library for data validation.
Stars: ✭ 205 (+439.47%)
Mutual labels:  validation, validator
Svelte Forms Lib
📝. A lightweight library for managing forms in Svelte
Stars: ✭ 238 (+526.32%)
Mutual labels:  validation, forms
react-form-validation-demo
React Form Validation Demo
Stars: ✭ 88 (+131.58%)
Mutual labels:  validation, forms
thai-citizen-id-validator
🦉 Validate Thai Citizen ID with 0 dependencies 🇹🇭
Stars: ✭ 35 (-7.89%)
Mutual labels:  validation, validator

Javascript form validator

Demo and Examples

We present you a very simple solution for validating HTML forms. If you do not want to pull a MB of JS dependencies, like, «jQuery» just for the sake of checking the correctness of the entered user data, then our solution will suit you.

Javascript Form Validator Screenshot Preview

How to use

  1. Include script on your page
  2. Apply «[data-rule]» attribute for each form element that you want to check, or the attribute value, specify the name of one or more rules
  3. You need to create an instance of Validator and pass it two parameters (Form handle and Callback function)
	<!-- Your form -->
	<form name="form" id="my-form">

		<!-- Required field email -->
		<input type="text" name="email" data-rule="required|email"/>

		<input type="submit" value="Submit"/>

	</form>

	<!-- Append the validator JS script -->
	<script type="text/javascript" src="js-form-validator.js"></script>

	<script>
		// Init validator with standart settings
		new Validator(document.querySelector('#my-form'), function (err, res) {
			return res;
		});
	</script>

What else

  • Rules customization
  • Errors messages customization
  • Automatic update when changing the form
  • Api

Full documentation and examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].