This jquery plugin helps to handle html input validation by applying rules to elements based on html attributes.
It is inspired by jquery-validation but has less complexity, more comfort and is easy adjustable for complex setups. Read more in the Documentation.
It has a high test coverage and is tested with jquery >1.10, >2 and >3
Installation
bower install jquery.input.validator # or npm install jquery.input.validator
Integration
Insert the following dependencies into your html file:
Examples
Local pattern
; // validate all inputs in your formvar result = ;if result === true console; // reset error hints; // validate element;
Gobal pattern
var validator = ; // validate all inputs in your formvar result = validator;if result === true console; // reset the error messagesvalidator;
Builtin validators
Validators are triggered from one or more attributes on an input element.
var validator = ; // validators by input typevalidator;validator;validator; // validators by html5 attributesvalidator;validator;validator; // validators by data attributesvalidator;validator; // add a custom message for an validatorvalidator;
Customize it all ♥️
All implementation specific logic can be replaced via config (see Documentation).
Resources
Dependencies
- jquery >=1.10.0 (also tested with >=2, >=3)
Services
Authors
Support on Beerpay
Hey dude! Help me out for a couple of 🍻!