Skip to content

New method nis br #2196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<!--
### Checklist for this issue
If your issue is about the regex used in `email` rule, please note that as of version 1.12.0 this plugin is using the same regular expression that the HTML5 specification suggests for browsers to use (https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address). 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 (http://jqueryvalidation.org/jQuery.validator.methods/).
-->

### Subject of the issue
Describe your issue here.
<!-- Describe your issue here. -->

### Your environment
* version of `jquery-validate`
* which browser and its version
* version of `jquery-validate`:
* which browser and its version:

### Steps to reproduce
Tell us how to reproduce this issue. If pssible, please provide a working demo in JSFiddle (https://jsfiddle.net) or JSBin (https://jsbin.com/).
<!--
Tell us how to reproduce this issue. If possible, please provide a working demo in JSFiddle (https://jsfiddle.net) or JSBin (https://jsbin.com/).
-->

### Expected behaviour
Tell us what should happen
<!-- Tell us what should happen -->

### Actual behaviour
Tell us what happens instead
<!-- Tell us what happens instead -->
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<!--
### Checklist for this pull request
Before submitting a pull request, please make sure to follow these rules:

* Your code should contain tests relevant for the problem you are solving.
* Your commits messages format should follow the jQuery git commit message format (http://contribute.jquery.org/commits-and-pull-requests/#commit-guidelines).
* The pull request should reference existing issues or link to a reproducible demo.
* Please review the guidelines for contributing (CONTRIBUTING.md) to this repository for more information.
-->

#### Description
Please describe your pull request.
<!-- Please describe your pull request. -->

Thank you!
24 changes: 24 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- "help wanted"
- "MERGE ME"
- "NEEDS REVIEW"
# Ignore issues in a milestone
exemptMilestones: true
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue/proposal has been automatically marked as idle and stale because it hasn't
had any recent activity. It will be automtically closed if no further activity
occurs. If you think this is wrong, or the problem still persists, just pop
a reply in the comments and one of the maintainers will (try!) to follow up.

Thank you for contributing :)
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
node_modules
.idea
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 0.12
- 6

sudo: false

Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## Reporting an Issue

1. Make sure the problem you're addressing is reproducible.
2. Use http://jsbin.com or http://jsfiddle.net to provide a test page.
2. Use https://jsbin.com or https://jsfiddle.net to provide a test page.
3. Indicate what browsers the issue can be reproduced in. **Note: IE Compatibilty mode issues will not be addressed. Make sure you test in a real browser!**
4. What version of the plug-in is the issue reproducible in. Is it reproducible after updating to the latest version.

Documentation issues are also tracked at the [jQuery Validation](https://github.com/jzaefferer/jquery-validation/issues) issue tracker.
Pull Requests to improve the docs are welcome at the [jQuery Validation docs](https://github.com/jzaefferer/validation-content) repository, though.
Documentation issues are also tracked at the [jQuery Validation](https://github.com/jquery-validation/jquery-validation/issues) issue tracker.
Pull Requests to improve the docs are welcome at the [jQuery Validation docs](https://github.com/jquery-validation/validation-content) repository, though.

**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](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address). 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](http://jqueryvalidation.org/jQuery.validator.addMethod/).
In case you need to adjust the built-in validation regular expression patterns, please [follow the documentation](http://jqueryvalidation.org/jQuery.validator.methods/).
Expand All @@ -26,7 +26,7 @@ Thanks for contributing! Here's a few guidelines to help your contribution get l
## Build setup

1. Install [NodeJS](http://nodejs.org).
2. Install the Grunt CLI To install by running `npm install -g grunt-cli`. More details are available on their website http://gruntjs.com/getting-started.
2. Install the Grunt CLI by running `npm install -g grunt-cli`. More details are available on their website http://gruntjs.com/getting-started.
3. Install the NPM dependencies by running `npm install`.
4. The build can now be called by running `grunt`.

Expand All @@ -46,8 +46,8 @@ Start with one browser while developing the fix, then run against others before

## Documentation

Please report documentation issues at the [jQuery Validation](https://github.com/jzaefferer/jquery-validation/issues) issue tracker.
In case your pull request implements or changes public API it would be a plus you would provide a pull request against the [jQuery Validation docs](https://github.com/jzaefferer/validation-content) repository.
Please report documentation issues at the [jQuery Validation](https://github.com/jquery-validation/jquery-validation/issues) issue tracker.
In case your pull request implements or changes public API it would be a plus you would provide a pull request against the [jQuery Validation docs](https://github.com/jquery-validation/validation-content) repository.

## Linting

Expand Down
26 changes: 24 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ grunt.initConfig( {
"<%= grunt.template.today('m/d/yyyy') %>\n" +
" * <%= pkg.homepage %>\n" +
" * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n"
" Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n"
},
dist: {
files: {
Expand Down Expand Up @@ -171,6 +171,27 @@ grunt.initConfig( {
}
]
}
},

// Generate the sub-resource integrity hashes of the distribution files
sri: {
options: {
algorithms: [ "sha256", "sha384", "sha512" ],

// The target json file
dest: "dist/jquery-validation-sri.json",

// Stringify the JSON output in a pretty format
pretty: true
},

all: {
src: [
"dist/jquery.validate.{min.js,js}",
"dist/additional-methods.{min.js,js}",
"dist/localization/*.js"
]
}
}
} );

Expand All @@ -183,9 +204,10 @@ grunt.loadNpmTasks( "grunt-contrib-watch" );
grunt.loadNpmTasks( "grunt-jscs" );
grunt.loadNpmTasks( "grunt-contrib-copy" );
grunt.loadNpmTasks( "grunt-text-replace" );
grunt.loadNpmTasks( "grunt-sri" );

grunt.registerTask( "default", [ "concat", "copy", "jscs", "jshint", "qunit" ] );
grunt.registerTask( "release", [ "default", "uglify", "replace", "compress" ] );
grunt.registerTask( "release", [ "default", "uglify", "replace", "compress", "sri" ] );
grunt.registerTask( "start", [ "concat", "watch" ] );

};
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[jQuery Validation Plugin](http://jqueryvalidation.org/) - Form validation made easy
[jQuery Validation Plugin](https://jqueryvalidation.org/) - Form validation made easy
================================

[![Build Status](https://secure.travis-ci.org/jzaefferer/jquery-validation.svg)](http://travis-ci.org/jzaefferer/jquery-validation)
[![devDependency Status](https://david-dm.org/jzaefferer/jquery-validation/dev-status.svg?theme=shields.io)](https://david-dm.org/jzaefferer/jquery-validation#info=devDependencies)
[![Join the chat at https://gitter.im/jzaefferer/jquery-validation](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jzaefferer/jquery-validation)
[![release](https://img.shields.io/github/release/jquery-validation/jquery-validation.svg)](https://github.com/jquery-validation/jquery-validation/releases/latest)
[![Build Status](https://secure.travis-ci.org/jquery-validation/jquery-validation.svg)](https://travis-ci.org/jquery-validation/jquery-validation)
[![devDependency Status](https://david-dm.org/jquery-validation/jquery-validation/dev-status.svg?theme=shields.io)](https://david-dm.org/jquery-validation/jquery-validation#info=devDependencies)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/jquery-validation/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery-validation)

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 http://jqueryvalidation.org/
Prebuilt files can be downloaded from https://jqueryvalidation.org/

### Downloading the latest changes

The unreleased development files can be obtained by:

1. [Downloading](https://github.com/jzaefferer/jquery-validation/archive/master.zip) or Forking this repository
1. [Downloading](https://github.com/jquery-validation/jquery-validation/archive/master.zip) or Forking this repository
2. [Setup the build](CONTRIBUTING.md#build-setup)
3. Run `grunt` to create the built files in the "dist" directory

Expand All @@ -32,7 +33,7 @@ Include jQuery and the plugin on a page. Then select a form to validate and call
<script src="jquery.js"></script>
<script src="jquery.validate.js"></script>
<script>
$("form").validate();
$("form").validate();
</script>
```

Expand All @@ -44,14 +45,33 @@ define(["jquery", "jquery.validate"], function( $ ) {
});
```

For more information on how to setup a rules and customizations, [check the documentation](http://jqueryvalidation.org/documentation/).
For more information on how to setup a rules and customizations, [check the documentation](https://jqueryvalidation.org/documentation/).

## Reporting issues and contributing code

See the [Contributing Guidelines](CONTRIBUTING.md) 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](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address). 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](http://jqueryvalidation.org/jQuery.validator.addMethod/).
In case you need to adjust the built-in validation regular expression patterns, please [follow the documentation](http://jqueryvalidation.org/jQuery.validator.methods/).
**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](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address). 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](https://jqueryvalidation.org/jQuery.validator.addMethod/).
In case you need to adjust the built-in validation regular expression patterns, please [follow the documentation](https://jqueryvalidation.org/jQuery.validator.methods/).

**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`](https://jqueryvalidation.org/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:
``` js
$("#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);
}
}
}
});
```

## License
Copyright &copy; Jörn Zaefferer<br>
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
"homepage": "http://jqueryvalidation.org/",
"homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
"url": "git://github.com/jzaefferer/jquery-validation.git"
"url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer <joern.zaefferer@gmail.com>"
Expand Down
14 changes: 10 additions & 4 deletions build/release.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/* Release checklist
- Run `git changelog` and edit to match previous output (this should make use of jquey-release instead)
- make sure the correct 'x.y.z-pre' version is defined in package.json
- pull latest https://github.com/jquery/jquery-release
- disable _generateChangelog task in release.js (BOOOO)
- run
node release.js --remote=jzaefferer/jquery-validation
node release.js --remote=jquery-validation/jquery-validation
- Wait a while, verify and confirm each step
- Create GitHub release: Pick the new tag, add changelog, upload zip
- Upload to NPM
git fetch --tags jzaefferer
git fetch --tags jquery-validation
git checkout tags/X.YY.Z
npm publish
- Update MS CDN (Ping Chris Sfanos)
- Check jsdelivr CDN: new git tags are automatically pulled, tested & merged via https://github.com/jsdelivr/jsdelivr/pulls
- Check cdnjs CDN: new git tags are automatically committed into https://github.com/cdnjs/cdnjs/commits/master
- Check cdnjs CDN: new git tags are automatically committed into https://github.com/cdnjs/cdnjs/commits/master or ping @cdnjs
- Update validation-content/pages/index.html (may have to hold off on CDN updates until available)
- Write blog post: Some highlights, changelog, download links
*/
Expand All @@ -35,11 +36,16 @@ Release.define({

generateArtifacts: function( done ) {
Release.exec( "grunt release", "Grunt command failed" );
// Keep this list of files in sync with package.json's files key
done([
"dist/localization/",
"dist/additional-methods.js",
"dist/additional-methods.min.js",
"dist/jquery.validate.js",
"dist/jquery.validate.min.js"
"dist/jquery.validate.min.js",

// The sub-resource integrity hashes of the distribution files
"dist/jquery-validation-sri.json"
]);
},

Expand Down
75 changes: 73 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
1.17.0 / 2017-07-20
==================

## 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)

1.16.0 / 2016-12-01
==================

## Additional
* Refine cifES and nieES algorithms. Closes #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'

## Localisation
* Add Urdu translation. Closes #1873.

## Localization
* 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.

1.15.1 / 2016-07-22
==================

Expand All @@ -24,7 +95,7 @@

## Tests
* Added regression unit tests for PR #1760

1.15.0 / 2016-02-24
==================

Expand Down Expand Up @@ -73,7 +144,7 @@
* Update Malay translation
* Included messages from additional methods
* Improving pt_BR translation and fixing a typo on the 'cifES' key.

1.14.0 / 2015-06-30
==================

Expand Down
2 changes: 1 addition & 1 deletion demo/ajaxSubmit-integration-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</script>
</head>
<body>
<h1 id="banner"><a href="http://jqueryvalidation.org/">jQuery Validation Plugin</a> Demo</h1>
<h1 id="banner"><a href="https://jqueryvalidation.org/">jQuery Validation Plugin</a> Demo</h1>
<div id="main">
<form method="post" class="cmxform" id="form" action="login.action">
<fieldset>
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy