Skip to content

Commit 4c6e0c3

Browse files
committed
Build 0.8.3
1 parent 0bbbfe1 commit 4c6e0c3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

dist/aspnet-validation.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,12 @@ var ValidationService = /** @class */ (function () {
717717
if (this.elementEvents[formUID]) {
718718
return;
719719
}
720+
var validating = false;
720721
var cb = function (e, callback) {
722+
// Prevent recursion
723+
if (validating) {
724+
return;
725+
}
721726
if (!_this.shouldValidate(e)) {
722727
return;
723728
}
@@ -730,7 +735,10 @@ var ValidationService = /** @class */ (function () {
730735
e.preventDefault();
731736
e.stopImmediatePropagation();
732737
}
738+
validating = true;
739+
_this.logger.log('Validating', form);
733740
validate.then(function (success) {
741+
_this.logger.log('Validated (success = %s)', success, form);
734742
var isProgrammaticValidate = !e;
735743
if (success) {
736744
if (isProgrammaticValidate) {
@@ -756,7 +764,9 @@ var ValidationService = /** @class */ (function () {
756764
_this.focusFirstInvalid(form);
757765
}
758766
}).catch(function (error) {
759-
console.log(error);
767+
_this.logger.log('Validation error', error);
768+
}).finally(function () {
769+
validating = false;
760770
});
761771
};
762772
form.addEventListener('submit', cb);

dist/aspnet-validation.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/aspnet-validation.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aspnet-client-validation",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"description": "Enables ASP.NET MVC client-side validation, without jQuery!",
55
"main": "dist/aspnet-validation.js",
66
"style": "dist/aspnet-validation.css",

yarn.lock

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -908,11 +908,6 @@
908908
"resolved" "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz"
909909
"version" "3.5.2"
910910

911-
912-
"integrity" "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
913-
"resolved" "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz"
914-
"version" "1.0.0"
915-
916911
"fill-range@^4.0.0":
917912
"integrity" "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc="
918913
"resolved" "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz"
@@ -999,11 +994,6 @@
999994
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
1000995
"version" "1.0.0"
1001996

1002-
"fsevents@~2.1.2":
1003-
"integrity" "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ=="
1004-
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz"
1005-
"version" "2.1.3"
1006-
1007997
"get-caller-file@^2.0.1":
1008998
"integrity" "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
1009999
"resolved" "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz"

0 commit comments

Comments
 (0)