Skip to content

Commit

Permalink
Build 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Nov 2, 2023
1 parent 2430929 commit 76643aa
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions dist/aspnet-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,9 @@ var ValidationService = /** @class */ (function () {
*/
this.handleValidated = function (form, success, submitEvent) {
if (success) {
_this.submitValidForm(form, submitEvent);
if (submitEvent) {
_this.submitValidForm(form, submitEvent);
}
}
else {
_this.focusFirstInvalid(form);
Expand Down Expand Up @@ -1242,7 +1244,7 @@ var ValidationService = /** @class */ (function () {
* @param removeClass Class to remove
*/
ValidationService.prototype.swapClasses = function (element, addClass, removeClass) {
if (!element.classList.contains(addClass)) {
if (addClass && !element.classList.contains(addClass)) {
element.classList.add(addClass);
}
if (element.classList.contains(removeClass)) {
Expand Down
2 changes: 1 addition & 1 deletion dist/aspnet-validation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/aspnet-validation.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aspnet-client-validation",
"version": "0.9.0",
"version": "0.9.1",
"description": "Enables ASP.NET MVC client-side validation, without jQuery!",
"main": "dist/aspnet-validation.js",
"style": "dist/aspnet-validation.css",
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export declare class ValidationService {
* @param success The validation result.
* @param submitEvent The `SubmitEvent`.
*/
handleValidated: (form: HTMLFormElement, success: boolean, submitEvent: SubmitEvent) => void;
handleValidated: (form: HTMLFormElement, success: boolean, submitEvent?: SubmitEvent) => void;
/**
* Dispatches a new `SubmitEvent` on the provided form,
* then calls `form.submit()` unless `submitEvent` is cancelable
Expand Down

0 comments on commit 76643aa

Please sign in to comment.