Skip to content

Commit

Permalink
Increment version and prepare release.
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Jul 3, 2023
1 parent 8b22e0a commit 831730d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
9 changes: 9 additions & 0 deletions dist/aspnet-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,15 @@ var MvcValidationProviders = /** @class */ (function () {
return true;
}
}
// Checkboxes do not submit a value when unchecked. To work around this, platforms such as ASP.NET render a
// hidden input with the same name as the checkbox so that a value ("false") is still submitted even when
// the checkbox is not checked. We check this special case here.
if (elementType === "checkbox") {
var checkboxHiddenInput = element.form.querySelector("input[name='".concat(element.name, "'][type='hidden']"));
if (checkboxHiddenInput instanceof HTMLInputElement && checkboxHiddenInput.value === "false") {
return true;
}
}
return false;
}
// Default behavior otherwise.
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.8.10",
"version": "0.8.11",
"description": "Enables ASP.NET MVC client-side validation, without jQuery!",
"main": "dist/aspnet-validation.js",
"style": "dist/aspnet-validation.css",
Expand Down
5 changes: 5 additions & 0 deletions wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ table.form-data {

table.form-data th {
text-align: left;
}

.results {
margin-left: 4px;
color: cadetblue;
}

0 comments on commit 831730d

Please sign in to comment.