Powerful Multi-Functional Form Validation Plugin - jQuery Validation

Powerful Multi-Functional Form Validation Plugin - jQuery Validation
File Size: 1.14 MB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

jQuery Validation is a javascript based plugin that helps you implement a powerful client side validator to your form elements that validate the value ( name, email, address, etc..) your user input when submitting.

You might also like:


$ npm install jquery-validation

# Bower
$ bower install jquery-validation

Basic Usage:

For more advanced usages, please check our more example pages list below.

1.  Include jQuery library and jquery.validate.js in your <head> tag

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../jquery.validate.js"></script>

2. Markup html structure

<form class="cmxform" id="commentForm" method="get" action="">
<legend>Please provide your name, email address (won't be published) and a comment</legend>
<label for="cname">Name (required, at least 2 characters)</label>
<input id="cname" name="name" minlength="2" type="text" required />
<label for="cemail">E-Mail (required)</label>
<input id="cemail" type="email" name="email" required />
<label for="curl">URL (optional)</label>
<input id="curl" type="url" name="url" />
<label for="ccomment">Your comment (required)</label>
<textarea id="ccomment" name="comment" required></textarea>
<input class="submit" type="submit" value="Submit"/>

3. Call the plugin

$().ready(function() {

More Examples:


v1.19.1 (2019-06-15)

  • Change focus() to trigger("focus")
  • Add zh_TW translation for step message
  • Adding Serbian translation for step method message

v1.18.0 (2018-09-10)

  • Add Brazillian PIS/NIS number validation method
  • Add validation method for Polish telephone number
  • Updated link to EAN docs in creditcard.js
  • Allow N11 exchange for non-geo US phone
  • Add new BIN range for MasterCard
  • Add maxfiles, maxsize and maxsizetotal methods
  • Add greaterThan and lessThan methods
  • Don't call submitHandler when in debug mode
  • Cast empty data attributes to 'true'
  • Ignore elements that belong to other/nested forms
  • Use element.isContentEditable instead of hasAttribute
  • Add deprecation warning to 'date' method
  • Allow the normalizer to return any value
  • Guard against null & undefined values in required method
  • Added more locals

v1.17.1 (2018-07-17)

  • Update and bugfix

v1.17.0 (2017-07-29)

  • Pass on the value of the used submit button for scripted submits
  • Removed aria-required attribute
  • Assign rules to contenteditable via .validate() and .rules()
  • Count invalid fields with empty message in numberOfInvalids()
  • Added support for button elements with descendants
  • Add support for defining a global normalizer
  • Add localized number validation to methods_nl.js
  • Remove unreachable return from cifES.js
  • Add optional support to cifES, nifES and nieES 
  • Add netmask validation method
  • Add Polish tax id validation method
  • Fixed validation for specific case for Spanish NIFs
  • Added Step Range Validation to messages_ja
  • Add hungarian step message
  • Add Sindhi locale
  • Added norsk step translation
  • Add missing french step translation
  • Added nl- translation for "step" property
  • Add French translation for notEqualTo method

v1.16.1 (2017-04-08)

  • Update

v1.16 (2016-12-02)

  • support jQuery 3+

v1.15.1 (2016-07-23)

  • Fix multiple mime-type validation
  • IBAN require at least 5 chars
  • Correct notEqualTo jQuery reference
  • Added failing test
  • Fix group validation with 3 and more fields
  • Fix regressions
  • Update step validation to handle floating points correctly
  • Fix error when calling $.fn.rules() on a non-form element
  • Call errorPlacement in validator scope
  • Fixed issue with contenteditable elements in forms where events for single input validation would cause exceptions
  • Added Azeri language

v1.15.0 (2016-02-25)

  • Fixed code style issues
  • resetForm should also remove valid class from elements.
  • Unhighlighting field if already highlighted when using remote rule.
  • Bind the blur event just once in equalTo rule
  • Fixed error when calling .rules() on empty jquery set.
  • Fix handling of error messages with input groups.
  • Fix TypeError in showLabel when using groups settings
  • Adding a way to pass method name to remote
  • Validation fails to trigger when next field is already filled out
  • Required rule take precedence over number & digits rules
  • Error hidden but input error class not removed
  • Remote validation uses wrong error messages
  • Fixed field highlighting with remote validation.
  • Fixed :filled selector for multiple select elements.
  • Added doc reference to jQuery.validator.methods
  • Move message processing from formatAndAdd to defaultMessage
  • ErrorList should contain only the errors that it should
  • Extract the file name without including "C:\fakepath\"
  • HTML5 step attribute support.
  • Added support for "pending" class on outstanding requests
  • Added normalizer 
  • Split out creditcard method
  • Escape errorID for use in the regex, not to build aria-describedby
  • Escape single quotes in names avoiding a Sizzle Error being thrown
  • Instead of using validating field's value to skip api call, use the serialized data object of the request
  • Add support for contentEditable tags
  • BIC: allow digits 1-9 in second place of location
  • Accept method regex should be escaped properly.
  • Case-insensitive check for BIC
  • Correct postalCodeCA to exclude invalid combinations
  • Make postalCodeCA method more lenient
  • Added Macedonian localization.
  • Added missing pattern message in Polish (adamwojtkiewicz)
  • Fixed Persian translation of min/max message.
  • Updated messages_sk.js
  • Update Malay translation
  • Included messages from additional methods
  • Improving pt_BR translation and fixing a typo on the 'cifES' key.

v1.14.0 (2015-06-26)

  • Remove unused removeAttrs method
  • Replace regex for url method
  • Remove bad url param in $.ajax, overwritten by $.extend
  • Properly handle nested cancel submit button
  • Fix indent
  • Refactor attributeRules and dataRules to share noramlizer
  • dataRules method to convert value to number for number inputs
  • Update url method to allow for protocol-relative URLs
  • Remove deprecated $.format placeholder
  • Use jQuery 1.7+ on/off, add destroy method
  • IE8 compatibility changed .indexOf to $.inArray
  • Cast NaN value attributes to undefined for Opera Mini
  • Stop trimming value inside required method
  • Use :disabled selector to match disabled elements
  • Exclude some keyboard keys to prevent revalidating the field
  • Do not search the whole DOM for radio/checkbox elements
  • Throw better errors for bad rule methods
  • Fixed number validation error
  • Fix reference to whatwg spec
  • Focus invalid element when validating a custom set of inputs
  • Reset element styles when using custom highlight methods
  • Escape dollar sign in error id
  • Revert "Ignore readonly as well as disabled fields."
  • Update link in comment for Luhn algorithm

This awesome jQuery plugin is developed by jquery-validation. For more Advanced Usages, please check the demo page or visit the official website.