jQuery Validation Plugin library sources

Overview

jQuery Validation Plugin - Form validation made easy

release Build Status devDependency Status jsDelivr Hits

The jQuery Validation Plugin provides drop-in validation for your existing forms, while making all kinds of customizations to fit your application really easy.

Getting Started

Downloading the prebuilt files

Prebuilt files can be downloaded from https://jqueryvalidation.org/

Downloading the latest changes

The unreleased development files can be obtained by:

  1. Downloading or Forking this repository
  2. Setup the build
  3. Run grunt to create the built files in the "dist" directory

Including it on your page

Include jQuery and the plugin on a page. Then select a form to validate and call the validate method.

<form>
	<input required>
</form>
<script src="jquery.js"></script>
<script src="jquery.validate.js"></script>
<script>
    $("form").validate();
</script>

Alternatively include jQuery and the plugin via requirejs in your module.

define(["jquery", "jquery.validate"], function( $ ) {
	$("form").validate();
});

For more information on how to setup a rules and customizations, check the documentation.

Reporting issues and contributing code

See the Contributing Guidelines for details.

IMPORTANT NOTE ABOUT EMAIL VALIDATION. As of version 1.12.0 this plugin is using the same regular expression that the HTML5 specification suggests for browsers to use. We will follow their lead and use the same check. If you think the specification is wrong, please report the issue to them. If you have different requirements, consider using a custom method. In case you need to adjust the built-in validation regular expression patterns, please follow the documentation.

IMPORTANT NOTE ABOUT REQUIRED METHOD. As of version 1.14.0 this plugin stops trimming white spaces from the value of the attached element. If you want to achieve the same result, you can use the normalizer that can be used to transform the value of an element before validation. This feature was available since v1.15.0. In other words, you can do something like this:

$("#myForm").validate({
	rules: {
		username: {
			required: true,
			// Using the normalizer to trim the value of the element
			// before validating it.
			//
			// The value of `this` inside the `normalizer` is the corresponding
			// DOMElement. In this example, `this` references the `username` element.
			normalizer: function(value) {
				return $.trim(value);
			}
		}
	}
});

Accessibility

For an invalid field, the default output for the jQuery Validation Plugin is an error message in a <label> element. This results in two <label> elements pointing to a single input field using the for attribute. While this is valid HTML, it has inconsistent support across screen readers.

For greater screen reader support in your form's validation, use the errorElement parameter in the validate() method. This option outputs the error in an element of your choice and automatically adds ARIA attributes to the HTML that help with screen reader support.

aria-describedby is added to the input field and it is programmatically tied to the error element chosen in the errorElement parameter.

$("#myform").validate({
  errorElement: "span"
});
<label for="name">Name</label>
<input id="name" aria-describedby="unique-id-here">
<span class="error" id="unique-id-here">This field is required</span>

Learn more about errorElement

License

Copyright © Jörn Zaefferer
Licensed under the MIT license.

Comments
  • API FIX Use aria-describedby and default error element changed to span

    API FIX Use aria-describedby and default error element changed to span

    Non-label error labels will now work correctly, with aria-describedby now superseding dependency on the 'for' attribute

    This provides a solution to the discussion noted in #900.

    A lot of work had to be done to rewrite the test cases to respect the 'span' error label... apologies if I have made any incorrect assumptions about this module.

    For legacy reasons, if the error element is set as a label explicitly, it still sets the 'for' attribute, but it isn't used anywhere in the module.

    opened by tractorcow 33
  • Validation without a FORM

    Validation without a FORM

    There is high demand for validating fields on the client side without ever submitting them. For example, imagine a client-side mortgage calculator. Nothing ever returns to the server yet we need to validate the fields.

    See also http://stackoverflow.com/questions/489722/jquery-ui-dialog-validation-without-using-form-tags

    opened by cowwoc 30
  • Looking for maintainers

    Looking for maintainers

    I'm looking for maintainers for this project! I haven't given up on it, but my available time is currently too limited to even deal with the day-to-day issue and PR triage. Especially when people contribute code, its a shame to have those pull requests lie around untouched for weeks.

    If you're interested in getting involved in an open source project that has a large user base, let me know! You can get started right away - look through open issues and pull requests, help fix or land them.

    stale 
    opened by jzaefferer 29
  • Summernote compatibility -

    Summernote compatibility - "Cannot read property 'replace' of undefined"

    Subject of the issue

    Validating a form containing a Summernote WYSIWYG field causes error.

    Your environment

    • Version of jquery-validate: 1.15.1
    • Version of summernote: 0.8.2
    • Browser: Chrome 54.0.2840.71

    Steps to reproduce

    Validate form containing Summernote field
    Type inside form then blur / trigger validation
    https://jsfiddle.net/benember/b0xchnnp/6/

    Expected behaviour

    Field validates

    Actual behaviour

    Console error:

    jquery.validate.js:1014 <br> Uncaught TypeError: Cannot read property 'replace' of undefined

    I Think this is related to: #1785 Which should have been merged into 1.15.1

    opened by bennybee 27
  • grouped Date-Select: error message disappears even if the group is considered invalid

    grouped Date-Select: error message disappears even if the group is considered invalid

    when selects are grouped together, error message handling is wired. even when one of the fields of the group is considered invalid, no error message is rendered.

    see https://jsfiddle.net/wzbptn6z/2/

    I am opening this issue mostly for discussion purposes, as I am not 100% confident that it is something which need to be handled by jquery-validation core, as the behaviour seems to only occur because of the onfocusout triggered validation.

    Bug 
    opened by staabm 26
  • Core: Adding a way to pass method name to remote

    Core: Adding a way to pass method name to remote

    This allows reusing remote as custom method via addMethod. Without this fix it will show standard "remote" message - instead of custom message from addMethod.

    Sample usage:

        $.validator.addMethod('workemail', function(value, element, param) {
            return $.validator.methods.remote.call(this, value, element, {
                url: "validate/workemail/"
            }, 'workemail');
        }, 'work email custom message');
    

    And in HTML I'm just using data-rule-workemail='true' attribute for input

    opened by wojwal 26
  • not catching invisible character in email validation

    not catching invisible character in email validation

    xyz@​gmail.​com consider the above email address, it looks fine but it has some invisible characters, after '@' and after 'gmail.', you can see them in the below link http://regexr.com/39ldg

    I think jquery validator should show error on this email but it doesn't. MySQL will store the record with those invisible characters, hence it wont be searchable unless you search with those invisible characters at the right places.

    Email 
    opened by salmanasiddiqui 24
  • Further phone and date RegEx corrections. (TRAVIS: passed) (LINT: passed)

    Further phone and date RegEx corrections. (TRAVIS: passed) (LINT: passed)

    Updated and refactored GB phone RegEx pattern. Fix holes in date validations. Standardise comment format. Updated reference URL. Fix travis/lint errors.

    opened by g1smd 23
  • Conflict between validate and jeditable plugins:

    Conflict between validate and jeditable plugins: "Cannot read property 'settings' of undefined"

    If you have an editable element under a validate form, you get an error.

    <form id="form">
    ...
    <div id="editable">Edit in place</div>
    </form>
    
    <script>
    $(function(){
      $('#form').validate();
      $('#editable').editable('http://www.example.org/save');
    });
    

    When clicking on the editable, it generates a form+input field and the validation plugin attaches to this field. In the delegate method, which does not check if the form has a validator before applying it.

    The fix seems to be trivial, add a test

    if (!validator) return;

    Will clone+pull request

    opened by tttp 23
  • Add support for contentEditable tags

    Add support for contentEditable tags

    Currently the validation library only works on classic form elements. However, there is no reason it can't work on rich text elements that have names and use contentEditable. This change adds support for these tags.

    opened by dorner 22
  • validating all tabs on form submit

    validating all tabs on form submit

    Currently validation happens only on the selected tab. But like to have the validation happening for all the tabs on form submit, would be workaround to achieve this?

    This is on one single form.

    opened by prithivirajan 22
  • Date validation failure. D

    Date validation failure. D

    Your environment

    • Version of JQV: 1.19
    • Browser name and version: Google Chrome 107.0.5304.107 (Build oficial) (64 bits)

    Current behavior

    Validator allows any kind of dates even considerating day 30 in February

    Expected behavior

    Validator must return an error message.

    Live demo

    Try to validate 1983-02-30 and validator doesn't show anny error message

    Bug 
    opened by lgnl272 3
  • Add ability to require at least one of multiple validation methods

    Add ability to require at least one of multiple validation methods

    New feature motivation

    I have an input that accepts Spanish nie and Spanish nif. Specifiying one of the formats is enough to pass validation.

    New feature description

    Have a new "metamethod" that allows for defining this kind of behavior

    New feature implementation

    Right now the format for rules "ands" all the rules as far as I know like

      rules: {
        // simple rule, converted to {required:true}
        name: "required",
        // compound rule
        email: {
          required: true,
          email: true
        }
      }
    

    The email needs to pass required AND email methods.

    A suggestion on how it could look like in the configuration:

      rules: {
        nifcif: {
          oneof: {
            nifES: true,
            nieES: true
          }
        }
      }
    

    Maybe there is already a way to define this but I'm not aware of it.

    Feature 
    opened by rodrigoaguilera 1
  • Add Uzbek language locale

    Add Uzbek language locale

    • Followed spacing rules
    • Implemented new language support
    • File named by ISO 639-1 format

    Description

    Added new locale for country: Uzbekistan.

    Thank you!

    opened by nuriddinislamov 0
  • greaterThan() not normalizing input

    greaterThan() not normalizing input

    Your environment

    • Version of jquery-validate: v1.19.5
    • Browser name and version: Firefox

    Current behavior

    I need to compare 2 datetime fields. They are localized so I have writen a normalizer to transform them to "YYYY-MM-DD hh:mm" form (including leading zeros). When I compare them with greaterThan() it fails because second date is not normalized

    Expected behavior

    If input field has a normalizer, use it before comparing.

    https://jsbin.com/goruriroto/edit?html,js,console,output

    It may also affect greaterThanEqual, lessThan and lessThanEqual

    Bug 
    opened by enboig 2
  • When applying rule to a class, custom messages applied only to first element

    When applying rule to a class, custom messages applied only to first element

    Your environment

    • Version of jquery-validate: Master
    • Browser name and version: Firefox

    Current behavior

    When aplying a rule to $(".myclass") it is only applied to the first element.

    Expected behavior

    When selecting a class, rule should be applied to all elements of the class.

    Live demo

    https://jsbin.com/lozamas/edit?html,console,output

    I also codded a unit test when trying to find a solution:

    	<form id="testForm29" class="testttt">
    	<div>
    		<input type="text" name="form29field1" id="form29field1" class="required-field-custom-message">
    	</div>
    	<div>
    		<input type="text" name="form29field2" id="form29field2" class="required-field-custom-message">
    	</div>
    	<div>
    		<input type="text" name="form29field0" id="form29field0">
    	</div>
    	</form>
    
    QUnit.test( "add rule to class with custom messages", function( assert ) {
    	assert.expect( 3 );
    	var form = $( "#testForm29" );
    	var v = form.validate();
    
    	$( "#form29field0" ).rules( "add", {
    		required: true,
    		messages: {
    			required: "Custom message"
    		}
    	} );
    
    	$( ".required-field-custom-message" ).rules( "add", {
    		required: true,
    		messages: {
    			required: "Custom message"
    		}
    	} );
    
    	v.form();
    
    	var label1 = $( "#form29field1" ).next( ".error:not(input)" ).text();
    	assert.equal( label1, "Custom message" );
    
    	var label2 = $( "#form29field2" ).next( ".error:not(input)" ).text();
    	assert.equal( label2, "Custom message" );
    
    	var label0 = $( "#form29field0" ).next( ".error:not(input)" ).text();
    	assert.equal( label0, "Custom message" );
    
    } );
    
    
    Bug 
    opened by enboig 0
Releases(1.19.5)
  • 1.19.5(Jul 1, 2022)

  • 1.19.4(May 19, 2022)

    1.19.4 / 2022-05-19

    Build

    • Add License.md to zip tarball (#2386)

    Chore

    • Updated build status badges (#2424)
    • Enabled stable bot (#2425)

    Core

    • Fixed validation for input type="date" (#2360)
    • Wait for pendingRequests to finish before submitting form (#2369)
    • Fixed bug for Html Editors (#2154) (#2422)
    • Fixed ReDoS vulnerability in URL2 validation (#2428)

    Test

    • Switch from Travis to GitHub workflows (#2423)
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.19.4.zip(1.35 MB)
  • 1.19.3(Jan 9, 2021)

    1.19.3 / 2021-01-09

    Core

    • CVE-2021-21252: fixed Regular Expression Denial of Service vulnerability (#2371)
    • Replaced deprecated jQuery functions (#2335)

    Chore

    • Add Accessibility section to Readme (#2149)

    Localization

    • Add "pattern" translation for French (#2363)
    • add phone validate translate for Turkish translation (#2343)
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.19.3.zip(1.37 MB)
  • 1.19.2(May 23, 2020)

    1.19.2 / 2020-05-23

    Core

    • Core: Fixes deprecated calls to jQuery trim for compat with newer jQuery core versions (#2328)

    Contributors

    • Brighton Balfrey
    • Markus Staab
    • Brahim Arkni
    Source code(tar.gz)
    Source code(zip)
  • 1.19.1(Jun 15, 2019)

    1.19.1 / 2019-06-15

    Core

    • Change focus() to trigger("focus") (#2243)

    Build

    • Set jQuery as a peer dependency (#2248)

    Localization

    • Add zh_TW translation for step message (#2245)
    • Adding Serbian translation for step method message (#2251)

    Contributors

    • Ahmed Gaber
    • Brahim Arkni
    • Dusan Orlovic
    • Markus Staab
    • Ryan Chang
    • Stephen Scott
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.19.1.zip(1.37 MB)
  • 1.19.0(Nov 28, 2018)

    IMPORTANT NOTE

    Subresource Integrity hashes

    As of 1.18.0, we started to provide Subresource Integrity hashes of all distribution files.

    The hashes for the 1.19.0 release can be found in the file jquery-validation-sri.json under dist folder.


    Changelog:

    Additional

    • Don't fail when field is optional in CNPJBR & CPFBR rules (#2236)
    • Add validation rule for mobile number of Russia Federation (#2207)
    • Add Brazillian CNPJ validation rule (#2222)
    • Add Brazillian CNH number (Carteira Nacional de Habilitacao) (#2234)
    • Add ABA Routing Number Validation (#2216)

    Core

    • Fix contenteditable detection's regression introduced in #2142 (#2235)

    Localization

    • Add Swedish translation for pattern (#2227)

    Thanks to all the Contributors

    • Brahim Arkni
    • Cory Silva
    • jehadja
    • João Issamu Francisco
    • Julio Spader
    • Markus Staab
    • Saeed Prez
    • Zhiliang Xu
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.19.0.zip(1.37 MB)
  • 1.18.0(Nov 27, 2018)

    IMPORTANT NOTE

    Subresource Integrity hashes

    As of this release, we started to provide Subresource Integrity hashes of all distribution files. The hashes can be found in the file jquery-validation-sri.json under dist folder. ~~Unfortunately for this release, we screwed up something and we got the hashes of two main files (dist/jquery.validate.js and dist/additional-methods.js) wrong, but the rest are fine. As a result, you have to download the sri file (direct link) from the release page instead.~~ It's all well and good. It was just an error of mixing files from my part (@Arkni).

    CDNJS

    Due to a copy-past error, the file localization/messages_ar.js (unminified version) now contains wrong content. We have already notified CDNJS maintainers and they confirmed to us that there is nothing we can do to change that file as they already have checksum and SRI calculated for every file once it has been added.

    So as a result, please either use the minified version of the same file or extract it from jquery-validation-1.18.0.zip attached in this release.


    Changelog:

    Core

    • Don't call submitHandler when in debug mode (#2193)
    • Cast empty data attributes to 'true' (#2182)
    • Ignore elements that belong to other/nested forms (#2147)
    • Use element.isContentEditable instead of hasAttribute (#2142)
    • Add deprecation warning to 'date' method (#2138)
    • Allow the normalizer to return any value (#2054)
    • Guard against null & undefined values in required method (#2053)

    Additional

    • Add Brazillian PIS/NIS number validation method (#2204)
    • Add validation method for Polish telephone number (#2136)
    • Updated link to EAN docs in creditcard.js (#2120)
    • Allow N11 exchange for non-geo US phone (#2098)
    • Add new BIN range for MasterCard (#2088)
    • Add maxfiles, maxsize and maxsizetotal methods (#2087)
    • Add greaterThan and lessThan methods (#2061)

    Build

    • Test on node 6.x and drop node 0.12.x (#2133)
    • Generate sub-resource integrity hashes of the distribution files (#2082)
    • Include localization files in tagged releases (#2057)
    • Include minified version of additional methods in npm package (#2057)

    Demo

    • Add sample code for Bootstrap 4 usage (#2173)

    Localization

    • Added Czech and Slovak translations for STEP method (#2197)
    • Add localized methods for italian culture (it) (#2195)
    • Add step validation string to message_zh (#2177)
    • Fix typo in pt-BR localization file (#2139)
    • Add message for phonePL method (#2136)
    • Update Norwegian language file (#2132)
    • Update Persian language file (#2122)
    • Update German language file (#2115)
    • Fix meaning in Bulgarian sentence (#2112)
    • Add remote translation to no (#2097)
    • Fixed wrong placeholder in vi translation (#2085)
    • Add missing format method in message_{fr,tr}.js files (#2075)
    • Fix typos in messages_pt_BR.js (#2073)
    • Add new danish translations (#2067)
    • Add Swedish validation message for remote (#2066)

    Test

    • Cast empty data attributes to 'true' (#2182)
    • Ignore elements that belong to other/nested forms (#2147)
    • Add tests for phonePL method (#2136)
    • Add missing description to a test (#2055)
    • Required method should return false for null & undefined values (#2053)

    Thanks to all the Contributors

    • Brahim Arkni
    • Caro Caserio
    • Cleiton da Silva Mendonça
    • George Gooding
    • George Henne
    • Geraldo Ribeiro
    • Hawkon
    • Hookyns
    • Javier Lopez Casanello
    • Jonathan
    • Keith Morrison
    • Kevin Mian Kraiker
    • Lukas Drgon
    • Lukasz
    • Marco Grossi
    • Markus Staab
    • Rob Johnston
    • Samuel Lie
    • Siamak Mokhtari
    • Uwe
    • Vencislav Atanasov
    • William Desportes
    • Yuan Xulei
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.18.0.zip(1.36 MB)
  • 1.17.0(Jul 29, 2017)

    Core

    • Pass on the value of the used submit button for scripted submits (#2019)
    • Removed aria-required attribute (#2012)
    • Assign rules to contenteditable via .validate() and .rules() (#1947)
    • Count invalid fields with empty message in numberOfInvalids() (#1942)
    • Added support for button elements with descendants (#1901)
    • Add support for defining a global normalizer (#1905)

    Additional

    • Add localized number validation to methods_nl.js (#2014)
    • Remove unreachable return from cifES.js (#1994)
    • Add optional support to cifES, nifES and nieES (#1966)
    • Add netmask validation method (#1955)
    • Add Polish tax id validation method (#1850)
    • Fixed validation for specific case for Spanish NIFs (#1914)

    Localization

    • Added Step Range Validation to messages_ja (#1936)
    • Add hungarian step message (#1888)
    • Add Sindhi locale (#1900)
    • Added norsk step translation (#1918)
    • Add missing french step translation (#1928)
    • Added nl- translation for "step" property (#1902)
    • Add French translation for notEqualTo method (#2033)

    Readme

    • Add note about trimming whitespaces inside required method (#2028)

    Tests

    • Pass on the value of the used submit button for scripted submits (#2019)
    • Use assert#pushResult instead of assert#push (#2018)

    All

    • Fix links after move to organization
    • Use https

    Build

    • Upgrade QUnit to 2.3.3 (#2018)

    Thanks to the contributors of this release

    Alex Bokii Armindo Maurits Bas van Marwijk Brahim Arkni cbrianso Dominik Krzywiecki GitHub Huzoor Bux jarey Jonathan manospasj Markus Staab Peter Philipp PhistucK Rob Johnston Rácz Tibor Zoltán tchiotludo Wang Sen Worthy7

    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.17.0.zip(1.35 MB)
  • 1.16.0(Dec 2, 2016)

    1.16.0 / 2016-12-01

    Additional

    • Refine cifES and nieES algorithms (#1826)

    Build

    • Include Minified Version in NPM Package
    • Bump dev-dependencies to latest versions

    Core

    • Add binding for input with button type. Closes #1891
    • Support jquery3. Closes #1866
    • Change jQuery alias 'expr[":"]' to 'expr.pseudos'

    Localization

    • Add Urdu translation. Closes #1873.
    • Fixed wrong file-extension for az translation. Closes #1890.
    • Added missing translation in pt-BR (Closes #1897)
    • Fixed typo in arabien language file.

    Tests

    • Upgrade QUnit to 2.0.

    UMD

    • Better support for CommonJS.
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.16.0.zip(1.34 MB)
  • 1.15.1(Jul 22, 2016)

    1.15.1 / 2016-07-22

    Additional

    • Fix multiple mime-type validation
    • IBAN require at least 5 chars (Closes #1797, Fixes #1674)
    • Correct notEqualTo jQuery reference

    Core

    • Added failing test for #1805
    • Fix group validation with 3 and more fields
    • Fix regressions introduced in #1644 and #1657 (Closes #1800)
    • 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

    Demo

    • Add links to Bootstrap and Semantic-UI demos to index.html
    • Use .on() instead of .validateDelegate()

    Localization

    • Added Azeri language

    Tests

    • Added regression unit tests for PR #1760
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.15.1.zip(1.27 MB)
  • 1.15.0(Feb 24, 2016)

    1.15.0 / 2016-02-24

    All

    • Fixed code style issues

    Core

    • 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 (Fixes #1508)
    • 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. Fixes #1295
    • Added support for "pending" class on outstanding requests
    • Added normalizer (#1602)
    • 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

    Additional

    • 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

    Localization

    • 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.
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.15.0.zip(1.26 MB)
  • 1.14.0(Jun 30, 2015)

    Core

    • Remove unused removeAttrs method
    • Replace regex for url method
    • Remove bad url param in $.ajax, overwritten by $.extend
    • Properly handle nested cancel submit button
    • 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

    Additionals

    • Update dateITA to address timezone issue
    • Fix extension method to only method period
    • Fix accept method to match period only
    • Update time method to allow single digit hour
    • Drop bad test for notEqualTo method
    • Add notEqualTo method
    • Use correct jQuery reference via $
    • Remove useless regex check in iban method
    • Brazilian CPF number

    Localization

    • Update messages_tr.js
    • Update messages_sr_lat.js
    • Adding Perú Spanish (ES PE)
    • Adding Georgian (ქართული, ge)
    • Fixed typo in catalan translation
    • Improve Finnish (fi) translation
    • Add armenian (hy_AM) locale
    • Extend italian (it) translation with currency method
    • Add bn_BD locale
    • Update zh locale
    • Remove full stop at the end of italian messages
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.14.0.zip(858.53 KB)
  • 1.13.1(Oct 14, 2014)

    Additionals

    • Add postalcodeBR method (cc6c4a4)
    • Fix pattern method when parameter is a string (4cecd73)

    Core

    • Ignore readonly as well as disabled fields. (9f4ba10)
    • Improve id escaping, store escaped id in describedby (#1269, d36d1bc)
    • Escape id/name before using it as a selector in errorsFor (#1275, 20f3e9f)
    • Allow 0 as value for autoCreateRanges (fe14d00)
    • Apply ignore setting to all validationTargetFor elements (f1c611e)
    • Use return value of submitHandler to allow or prevent form submit (#650, 8b2f1e0)
    • Explicit default for focusCleanup option (#676, 0cb3c95)
    • Fix incorrect regexp (#1200, c054707)
    • Don't trim value in min/max/rangelength methods (#1274, 452b823)
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.13.1.zip(910.92 KB)
  • 1.13.0(Jul 1, 2014)

    All

    • Add plugin UMD wrapper

    Core

    • Respect non-error aria-describedby and empty hidden errors
    • Improve dateISO RegExp
    • Added radio/checkbox to delegate click-event
    • Use aria-describedby for non-label elements
    • Register focusin, focusout and keyup also on radio/checkbox
    • Fix normalization for rangelength attribute value
    • Update elementValue method to deal with type="number" fields
    • Use charAt instead of array notation on strings, to support IE8(?)

    Localization

    • Fix sk translation of rangelength method
    • Add Finnish methods
    • Fixed GL number validation message
    • Fixed ES number method validation message
    • Added galician (GL)
    • Fixed French messages for min and max methods

    Additionals

    • Add statesUS method
    • Fix dateITA method to deal with DST bug
    • Add persian date method
    • Add postalCodeCA method
    • Add postalcodeIT method
    Source code(tar.gz)
    Source code(zip)
  • 1.12.0(Apr 1, 2014)

    • Add ARIA testing (3d5658e)
    • Add es-AR localization messages. (7b30beb)
    • Add missing dots to 'es' and 'es_AR' messages. (a2a653c)
    • Added Indonesian (ID) localization (1d348bd)
    • Added NIF, NIE and CIF Spanish documents numbers validation (#830, 317c20f)
    • Added the current form to the context of the remote ajax request (0a18ae6)
    • Additionals: Update IBAN method, trim trailing whitespaces (#970, 347b04a)
    • BIC method: Improve RegEx, {1} is always redundant. Closes gh-744 (5cad6b4)
    • Bower: Add Bower.json for package registration (e86ccb0)
    • Changes references from '$' to 'jQuery', for compability with jQuery.noConflict. Closes gh-754 (2049afe)
    • Core: Add "method" field to error list entry (89a15c7)
    • Core: Added support for generic messages via data-msg attribute (5bebaa5)
    • Core: Allow attributes to have a value of zero (eg min='0') (#854, 9dc0d1d)
    • Core: Disable deprecated $.format (#755, bf3b350)
    • Core: Fix support for multiple error classes (c1f0baf)
    • Core: Ignore events on ignored elements (#700, a864211)
    • Core: Improve elementValue method (6c041ed)
    • Core: Make element() handle ignored elements properly. (3f464a8)
    • Core: Switch dataRules parsing to W3C HTML5 spec style (460fd22)
    • Core: Trigger success on optional but have other successful validators (#851, f93e1de)
    • Core: Use plain element instead of un-wrapping the element again (03cd4c9)
    • Core: make sure remote is executed last (#711, ad91b6f)
    • Demo: Use correct option in multipart demo. (#1025, 070edc7)
    • Fix $/jQuery usage in additional methods. Fixes #839 (#839, 59bc899)
    • Improve Chinese translations (1a0bfe3)
    • Initial ARIA-Required implementation (bf3cfb2)
    • Localization: change accept values to extension. Fixes #771, closes gh-793. (#771, 12edec6)
    • Messages: Add icelandic localization (dc88575)
    • Messages: Add missing dots to 'bg', 'fr' and 'sr' messages. (adbc636)
    • Messages: Create messages_sr_lat.js (f2f9007)
    • Messages: Create messages_tj.js (de830b3)
    • Messages: Fix sr_lat translation, add missing space (880ba1c)
    • Messages: Update messages_sr.js, fix missing space (10313f4)
    • Methods: Add additional method for currency (1a981b4)
    • Methods: Adding Smart Quotes to stripHTML's punctuation removal (aa0d624)
    • Methods: Fix dateITA method, avoiding summertime errors (279b932)
    • Methods: Localized methods for chilean culture (es-CL) (cf36b93)
    • Methods: Update email to use HTML5 regex, remove email2 method (#828, dd162ae)
    • Pattern method: Remove delimiters, since HTML5 implementations don't include those either. (37992c1)
    • Restricting credit card validator to include length check. Closes gh-772 (f5f47c5)
    • Update messages_ko.js - closes gh-715 (5da3085)
    • Update messages_pt_BR.js. Closes gh-782 (4bf813b)
    • Update phonesUK and mobileUK to accept new prefixes. Closes gh-750 (d447b41)
    • Verify nine-digit zip codes. Closes gh-726 (165005d)
    • phoneUS: Add N11 exclusions. Closes gh-861 (519bbc6)
    • resetForm should clear any aria-invalid values (4f8a631)
    • valid(): Check all elements. Fixes #791 - valid() validates only the first (invalid) element (#791, 6f26803)
    Source code(tar.gz)
    Source code(zip)
    jquery-validation-1.12.0.zip(704.37 KB)
  • 1.11.1(Aug 23, 2013)

    • Revert to also converting parameters of range method to numbers. Closes gh-702
    • Replace most usage of PHP with mockjax handlers. Do some demo cleanup as well, update to newer masked-input plugin. Keep captcha demo in PHP. Fixes #662
    • Remove inline code highlighting from milk demo. View source works fine.
    • Fix dynamic-totals demo by trimming whitespace from template content before passing to jQuery constructor
    • Fix min/max validation. Closes gh-666. Fixes #648
    • Fixed 'messages' coming up as a rule and causing an exception after being updated through rules("add"). Closes gh-670, fixes #624
    • Add Korean (ko) localization. Closes gh-671
    • Improved the UK postcode method to filter out more invalid postcodes. Closes #682
    • Update messages_sv.js. Closes #683
    • Change grunt link to the project website. Closes #684
    • Move remote method down the list to run last, after all other methods applied to a field. Fixes #679
    • Update plugin.json description, should include the word 'validate'
    • Fix typos
    • Fix jQuery loader to use path of itself. Fixes nested demos.
    • Update grunt-contrib-qunit to make use of PhantomJS 1.8, when installed through node module 'phantomjs'
    • Make valid() return a boolean instead of 0 or 1. Fixes #109 - valid() does not return boolean value
    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Aug 23, 2013)

    • Remove clearing as numbers of min, max and range rules. Fixes #455. Closes gh-528.
    • Update pre-existing labels - fixes #430 closes gh-436
    • Fix $.validator.format to avoid group interpolation, where at least IE8/9 replaces -bash with the match. Fixes #614
    • Fix mimetype regex
    • Add plugin manifest and update headers to just MIT license, drop unnecessary dual-licensing (like jQuery).
    • Hebrew messages: Removed dots at end of sentences - Fixes gh-568
    • French translation for require_from_group validation. Fixes gh-573.
    • Allow groups to be an array or a string - Fixes #479
    • Removed spaces with multiple MIME types
    • Fix some date validations, JS syntax errors.
    • Remove support for metadata plugin, replace with data-rule- and data-msg- (added in 907467e8) properties.
    • Added sftp as a valid url-pattern
    • Add Malay (my) localization
    • Update localization/messages_hu.js
    • Remove focusin/focusout polyfill. Fixes #542 - Inclusion of jquery.validate interfers with focusin and focusout events in IE9
    • Localization: Fixed typo in finnish translation
    • Fix RTM demo to show invalid icon when going from valid back to invalid
    • Fixed premature return in remote function which prevented ajax call from being made in case an input was entered too quickly. Ensures remote validation always validates the newest value.
    • Undo fix for #244. Fixes #521 - E-mail validation fires immediately when text is in the field.
    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Aug 23, 2013)

    • Corrected French strings for nowhitespace, phoneUS, phoneUK and mobileUK based upon community feedback.
    • rename files for language_REGION according to the standard ISO_3166-1 (http://en.wikipedia.org/wiki/ISO_3166-1), for Taiwan tha language is Chinese (zh) and the region is Taiwan (TW)
    • Optimise RegEx patterns, especially for UK phone numbers.
    • Add Language Name for each file, rename the language code according to the standard ISO 639 for Estonian, Georgian, Ukrainian and Chinese (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
    • Added croatian (HR) localization
    • Existing French translations were edited and French translations for the additional methods were added.
    • Merged in changes for specifying custom error messages in data attributes
    • Updated UK Mobile phone number regex for new numbers. Fixes #154
    • Add element to success call with test. Fixes #60
    • Fixed regex for time additional method. Fixes #131
    • resetForm now clears old previousValue on form elements. Fixes #312
    • Added checkbox test to require_from_group and changed require_from_group to use elementValue. Fixes #359
    • Fixed dataFilter response issues in jQuery 1.5.2+. Fixes #405
    • Added jQuery Mobile demo. Fixes #249
    • Deoptimize findByName for correctness. Fixes #82 - $.validator.prototype.findByName breaks in IE7
    • Added US zip code support and test. Fixes #90
    • Changed lastElement to lastActive in keyup, skip validation on tab or empty element. Fixes #244
    • Removed number stripping from stripHtml. Fixes #2
    • Fixed invalid count on invalid to valid remote validation. Fixes #286
    • Add link to file_input to demo index
    • Moved old accept method to extension additional-method, added new accept method to handle standard browser mimetype filtering. Fixes #287 and supersedes #369
    • Disables blur event when onfocusout is set to false. Test added.
    • Fixed value issue for radio buttons and checkboxes. Fixes #363
    • Added test for rangeWords and fixed regex and bounds in method. Fixes #308
    • Fixed TinyMCE Demo and added link on demo page. Fixes #382
    • Changed localization message for min/max. Fixes #273
    • Added pseudo selector for text input types to fix issue with default empty type attribute. Added tests and some test markup. Fixes #217
    • Fixed delegate bug for dynamic-totals demo. Fixes #51
    • Fix incorrect message for alphanumeric validator
    • Removed incorrect false check on required attribute
    • required attribute fix for non-html5 browsers. Fixes #301
    • Added methods "require_from_group" and "skip_or_fill_minimum"
    • Use correct iso code for swedish
    • Updated demo HTML files to use HTML5 doctype
    • Fixed regex issue for decimals without leading zeroes. Added new methods test. Fixes #41
    • Introduce a elementValue method that normalizes only string values (don't touch array value of multi-select). Fixes #116
    • Support for dynamically added submit buttons, and updated test case. Uses validateDelegate. Code from PR #9
    • Fix bad double quote in test fixtures
    • Fix maxWords method to include the upper bound, not exclude it. Fixes #284
    • Fixed grammar error in german range validator message. Fixes #315
    • Fixed handling of multiple class names for errorClass option. Test by Max Lynch. Fixes #280
    • Fix jQuery.format usage, should be $.validator.format. Fixes #329
    • Methods for 'all' UK phone numbers + UK postcodes
    • Pattern method: Convert string param to RegExp. Fixes issue #223
    • grammar error in german localization file
    • Added Estonian localization for messages
    • Improve tooltip handling on themerollered demo
    • Add type="text" to input fields without type attribute to please qSA
    • Update themerollered demo to use tooltip to show errors as overlay.
    • Update themerollered demo to use latest jQuery UI (along with newer jQuery version). Move code around to speed up page load.
    • Fixed min error message broken in Japanese.
    • Update form plugin to latest version. Enhance the ajaxSubmit demo.
    • Drop dateDE and numberDE methods from classRuleSettings, leftover from moving those to localized methods
    • Passing submit event to submitHandler callback
    • Fixed #219 - Fix valid() on elements with dependency-callback or dependency-expression.
    • Improve build to remove dist dir to ensure only the current release gets zipped up
    Source code(tar.gz)
    Source code(zip)
  • 1.9.0(Aug 23, 2013)

    • Added Basque (EU) localization
    • Added Slovenian (SL) localization
    • Fixed issue #127 - Finnish translations has one : instead of ;
    • Fixed Russian localization, minor syntax issue
    • Added in support for HTML5 input types, fixes #97
    • Improved HTML5 support by setting novalidate attribute on the form, and reading the type attribute.
    • Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes #151.
    • Added 'pattern' to additional-methods to validate against arbitrary regular expressions.
    • Improved email method to not allow the dot at the end (valid by RFC, but unwanted here). Fixes #143
    • Fixed swedish and norwegian translations, min/max messages got switched. Fixes #181
    • Fixed #184 - resetForm: should unset lastElement
    • Fixed #71 - improve existing time method and add time12h method for 12h am/pm time format
    • Fixed #177 - Fix validation of a single radio or checkbox input
    • Fixed #189 - :hidden elements are now ignored by default
    • Fixed #194 - Required as attribute fails if jQuery>=1.6 - Use .prop instead of .attr
    • Fixed #47, #39, #32 - Allowed credit card numbers to contain spaces as well as dashes (spaces are commonly input by users).
    Source code(tar.gz)
    Source code(zip)
  • 1.8.1(Aug 23, 2013)

    • Added Thai (TH) localization, fixes #85
    • Added Vietnamese (VI) localization, thanks Ngoc
    • Fixed issue #78. Error/Valid styling applies to all radio buttons of same group for required validation.
    • Don't use form.elements as that isn't supported in jQuery 1.6 anymore. Its buggy as hell anyway (IE6-8: form.elements === form).
    Source code(tar.gz)
    Source code(zip)
  • 1.8.0(Aug 23, 2013)

    • Improved NL localization (http://plugins.jquery.com/node/14120)
    • Added Georgian (GE) localization, thanks Avtandil Kikabidze
    • Added Serbian (SR) localization, thanks Aleksandar Milovac
    • Added ipv4 and ipv6 to additional methods, thanks Natal Ngétal
    • Added Japanese (JA) localization, thanks Bryan Meyerovich
    • Added Catalan (CA) localization, thanks Xavier de Pedro
    • Fixed missing var statements within for-in loops
    • Fix for remote validation, where a formatted message got messed up (https://github.com/jzaefferer/jquery-validation/issues/11)
    • Bugfixes for compatibility with jQuery 1.5.1, while maintaining backwards-compatibility
    Source code(tar.gz)
    Source code(zip)
  • 1.8.0pre(Aug 23, 2013)

  • 1.7.0(Jun 30, 2015)

    • Added Lithuanian (LT) localization
    • Added Greek (EL) localization (http://plugins.jquery.com/node/12319)
    • Added Latvian (LV) localization (http://plugins.jquery.com/node/12349)
    • Added Hebrew (HE) localization (http://plugins.jquery.com/node/12039)
    • Fixed Spanish (ES) localization (http://plugins.jquery.com/node/12696)
    • Added jQuery UI themerolled demo
    • Removed cmxform.js
    • Fixed four missing semicolons (http://plugins.jquery.com/node/12639)
    • Renamed phone-method in additional-methods.js to phoneUS
    • Added phoneUK and mobileUK methods to additional-methods.js (http://plugins.jquery.com/node/12359)
    • Deep extend options to avoid modifying multiple forms when using the rules-method on a single element (http://plugins.jquery.com/node/12411)
    • Bugfixes for compatibility with jQuery 1.4.2, while maintaining backwards-compatibility
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Jun 30, 2015)

    • Added Arabic (AR), Portuguese (PTPT), Persian (FA), Finnish (FI) and Bulgarian (BR) localization
    • Updated Swedish (SE) localization (some missing html iso characters)
    • Fixed $.validator.addMethod to properly handle empty string vs. undefined for the message argument
    • Fixed two accidental global variables
    • Enhanced min/max/rangeWords (in additional-methods.js) to strip html before counting; good when counting words in a richtext editor
    • Added localized methods for DE, NL and PT, removing the dateDE and numberDE methods (use messages_de.js and methods_de.js with date and number methods instead)
    • Fixed remote form submit synchronization, kudos to Matas Petrikas
    • Improved interactive select validation, now validating also on click (via option or select, inconsistent across browsers); doesn't work in Safari, which doesn't trigger a click event at all on select elements; fixes http://plugins.jquery.com/node/11520
    • Updated to latest form plugin (2.36), fixing http://plugins.jquery.com/node/11487
    • Bind to blur event for equalTo target to revalidate when that target changes, fixes http://plugins.jquery.com/node/11450
    • Simplified select validation, delegating to jQuery's val() method to get the select value; should fix http://plugins.jquery.com/node/11239
    • Fixed default message for digits (http://plugins.jquery.com/node/9853)
    • Fixed issue with cached remote message (http://plugins.jquery.com/node/11029 and http://plugins.jquery.com/node/9351)
    • Fixed a missing semicolon in additional-methods.js (http://plugins.jquery.com/node/9233)
    • Added automatic detection of substitution parameters in messages, removing the need to provide format functions (http://plugins.jquery.com/node/11195)
    • Fixed an issue with :filled/:blank somewhat caused by Sizzle (http://plugins.jquery.com/node/11144)
    • Added an integer method to additional-methods.js (http://plugins.jquery.com/node/9612)
    • Fixed errorsFor method where the for-attribute contains characters that need escaping to be valid inside a selector (http://plugins.jquery.com/node/9611)
    Source code(tar.gz)
    Source code(zip)
Owner
people and sources arround the jquery validation plugin project
null
FieldVal - multipurpose validation library. Supports both sync and async validation.

FieldVal-JS The FieldVal-JS library allows you to easily validate data and provide readable and structured error reports. Documentation and Examples D

null 137 Sep 24, 2022
A package to search bin details from various sources

BIN-LOOKUP Search bin details from various bin database Available Sources bins.ws binov.net bins.su Installation npm i @arnabxd/bin-lookup or yarn add

XD Bots 6 Dec 29, 2022
jQuery form validation plugin

jQuery.validationEngine v3.1.0 Looking for official contributors This project has now been going on for more than 7 years, right now I only maintain t

Cedric Dugas 2.6k Dec 23, 2022
HTML 5 & Bootstrap Jquery Form Validation Plugin

HTML 5 & Bootstrap Jquery Form Validation Plugin HTML 5 & Bootstrap 5 & Jquery 3 jbvalidator is a fresh new jQuery based form validation plugin that i

null 37 Dec 6, 2022
Lightweight JavaScript form validation library inspired by CodeIgniter.

validate.js validate.js is a lightweight JavaScript form validation library inspired by CodeIgniter. Features Validate form fields from over a dozen r

Rick Harrison 2.6k Dec 15, 2022
The most powerful data validation library for JS

joi The most powerful schema description language and data validator for JavaScript. Installation npm install joi Visit the joi.dev Developer Portal f

Sideway Inc. 19.6k Jan 4, 2023
Lightweight and powerfull library for declarative form validation

Formurai is a lightweight and powerfull library for declarative form validation Features Setup Usage Options Methods Rules Examples Roadmap Features ?

Illia 49 May 13, 2022
A simple credit cards validation library in JavaScript

creditcard.js A simple credit cards validation library in JavaScript. Project website: https://contaazul.github.io/creditcard.js Install creditcard.js

ContaAzul 323 Jan 7, 2023
v8n ☑️ ultimate JavaScript validation library

The ultimate JavaScript validation library you've ever needed. Dead simple fluent API. Customizable. Reusable. Installation - Documentation - API Intr

Bruno C. Couto 4.1k Dec 30, 2022
A lightweight NodeJS library for strict mime-type validation on streams

A lightweight NodeJS library for strict mime-type validation on streams. It gets a ReadableStream and decets the mime-type using its Magic number and validates it using the provided allowed and forbidden lists; If it's allowed it will pass it to the created WritableStreams and if it's not it will throw an error.

CEO of Death Star 9 Apr 3, 2022
Themis is a validation and processing library that helps you always make sure your data is correct.

Dataffy Themis - The advanced validation library Themis is a validation and processing library that helps you always make sure your data is correct. ·

Dataffy 14 Oct 27, 2022
JQuery-TableToExcel - Light weight jQuery plugin for export HTML table to excel file

tableToExcel Light weight jQuery plugin for export table to excel file Demos Website and demo here: http://tanvirpro.com/all_project/jQueryTableToExce

Tanvir Sarker 4 May 8, 2022
Jquery.iocurve - jQuery plugin like Tone Curve on Photoshop or GIMP

jquery.iocurve jQuery plugin like Tone Curve on Photoshop or GIMP. See Official page for more information. Quick start Create HTML and open in your br

null 5 Jul 28, 2022
Jquery.Circle.js - Circle is a Javascript global-menu library for jQuery.

Circle About Circle is a Javascript global-menu library for jQuery. Read more at the website: http://uc.gpgkd906.com/ Installation Just include the Ja

陈瀚 3 Jul 19, 2021
String validation

validator.js A library of string validators and sanitizers. Strings only This library validates and sanitizes strings only. If you're not sure if your

null 20.7k Jan 5, 2023
Cross Browser HTML5 Form Validation.

Validatr Cross Browser HTML5 Form Validation. Getting Started View the documentation to learn how to use Validatr. Changelog Version 0.5.1 - 2013-03-1

Jay Morrow 279 Nov 1, 2022
Dead simple Object schema validation

Yup Yup is a JavaScript schema builder for value parsing and validation. Define a schema, transform a value to match, validate the shape of an existin

Jason Quense 19.2k Jan 2, 2023
Schema-Inspector is an JSON API sanitisation and validation module.

Schema-Inspector is a powerful tool to sanitize and validate JS objects. It's designed to work both client-side and server-side and to be scalable wit

null 494 Oct 3, 2022