Skip to content

Issue323 Make IE compatible #385

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

Merged
Merged
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
17 changes: 2 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ module.exports = function (grunt) {
});

/*
* Change to new version or the next version number in all files
* containing the version definition
* Change to new version or the next version number. The project must be built again after this task
* in order for the version change to take effect.
*/
grunt.registerTask('version', 'Bump up the version number, or change version name by adding --new-version=3.1.0', function () {
var pkg = grunt.config.get('pkg'),
Expand All @@ -142,19 +142,6 @@ module.exports = function (grunt) {
}

grunt.log.writeln('* Moving from version ' + currentVersion + ' to ' + newVersion);
var fromVersion = '@version ' + currentVersion,
toVersion = '@version ' + newVersion;


// replace version in config files and dev-files
fs.readdirSync(SRC_DIR).forEach(function(file) {
if (isJavascriptFile(file)) {
replaceInFile(SRC_DIR+file, fromVersion, toVersion);
}
});
filesToBuild.devFiles.forEach(function (filePath) {
replaceInFile(filePath, fromVersion, toVersion);
});

replaceInFile('package.json', '"version": "' + currentVersion + '"', '"version": "' + newVersion + '"');
replaceInFile('formvalidator.jquery.json', '"version": "' + currentVersion + '"', '"version": "' + newVersion + '"');
Expand Down
1 change: 0 additions & 1 deletion form-validator/brazil.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*
* @website http://formvalidator.net/#brazil-validators
* @license MIT
* @version 2.2.163
*/

$.formUtils.addValidator({
Expand Down
2 changes: 1 addition & 1 deletion form-validator/brazil.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/date.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*
* @website http://formvalidator.net/#location-validators
* @license MIT
* @version 2.2.163
*/
(function($) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/date.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* JQUERY-FORM-VALIDATOR
*
* @version 2.2.163
* @version 2.2.164
* @website http://formvalidator.net/
* @author Victor Jonsson, http://victorjonsson.se
* @license MIT
Expand Down
1 change: 0 additions & 1 deletion form-validator/file.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*
* @website http://formvalidator.net/#file-validators
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/file.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/html5.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.157
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/html5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions form-validator/jquery.form-validator.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion form-validator/jsconf.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @website http://formvalidator.net/#location-validators
* @license MIT
* @version 2.2.163
*/
(function($) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/jsconf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* JQUERY-FORM-VALIDATOR
*
* @version 2.2.163
* @version 2.2.164
* @website http://formvalidator.net/
* @author Victor Jonsson, http://victorjonsson.se
* @license MIT
Expand Down
1 change: 0 additions & 1 deletion form-validator/lang/cz.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/cz.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/de.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/de.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/es.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/fr.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/fr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion form-validator/lang/it.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/pl.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/pl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/pt.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/pt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/ro.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/ro.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/ru.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/ru.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/lang/sv.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/lang/sv.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/location.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*
* @website http://formvalidator.net/#location-validators
* @license MIT
* @version 2.2.163
*/
(function($) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/location.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions form-validator/sanitize.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down Expand Up @@ -67,14 +66,17 @@
return this.insert(val, $input, 'left');
},
numberFormat : function(val, $input) {
if (val.length === 0) {
return val;
}
if ( 'numeral' in window ) {
//If this has been previously formatted, it needs to be unformatted first before being reformatted.
//Else numeral will fail
val = numeral().unformat(val);
val = numeral(val).format( $input.attr('data-sanitize-number-format') );
}
else {
throw new Error('Using sanitation function "numberFormat" requires that you include numeral.js ' +
throw new ReferenceError('Using sanitation function "numberFormat" requires that you include numeral.js ' +
'(http://numeraljs.com/)');
}
return val;
Expand Down
4 changes: 2 additions & 2 deletions form-validator/sanitize.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/security.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*
* @website http://formvalidator.net/#security-validators
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/security.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions form-validator/src/core-validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,16 @@
allowsSteps = false;

var sanitize = $el.attr('data-sanitize') || '';
var isFormattedWithNumeral = sanitize.split(/\s/).find(function (name) {
return (name === 'numberFormat');
});
var isFormattedWithNumeral = sanitize.match(/(^|[\s])numberFormat([\s]|$)/i);
if (isFormattedWithNumeral) {
if (!window.numeral) {
throw new ReferenceError('The data-sanitize value numberFormat cannot be used without the numeral' +
' library. Please see Data Validation in http://www.formvalidator.net for more information.');
}
//Unformat input first, then convert back to String
val = String(numeral().unformat(val));
if (val.length) {
val = String(numeral().unformat(val));
}
}

if (allowing.indexOf('number') === -1) {
Expand Down
1 change: 0 additions & 1 deletion form-validator/sweden.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*
* @website http://formvalidator.net/#swedish-validators
* @license MIT
* @version 2.2.163
*/
(function($, window) {

Expand Down
2 changes: 1 addition & 1 deletion form-validator/sweden.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion form-validator/toggleDisabled.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*
* @website http://formvalidator.net/
* @license MIT
* @version 2.2.138
*/
(function($, window, undefined) {

Expand Down
Loading