Skip to content

Commit

Permalink
chore: update qodana config
Browse files Browse the repository at this point in the history
  • Loading branch information
jukbot committed Sep 21, 2023
1 parent b41f36c commit 25439a8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 473 deletions.
8 changes: 4 additions & 4 deletions docs/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ document.addEventListener("DOMContentLoaded", () => {

btn.addEventListener("click", handleSubmit);

function handleInput(event) {
function handleInput() {
const value = mask.unmaskedValue;
const maxLength = 13;
const regex = /^[0-9]\d*$/;
Expand All @@ -24,9 +24,9 @@ document.addEventListener("DOMContentLoaded", () => {

btn.disabled = !(isValidLength && isValidFormat && isThaiIDValid);

input.setAttribute("aria-invalid", !isThaiIDValid);
error.setAttribute("aria-hidden", isThaiIDValid);
success.setAttribute("aria-hidden", !isThaiIDValid);
input.setAttribute("aria-invalid", String(!isThaiIDValid));
error.setAttribute("aria-hidden", String(isThaiIDValid));
success.setAttribute("aria-hidden", String(!isThaiIDValid));
error.style.display = isThaiIDValid ? "none" : "block";
success.style.display = isThaiIDValid ? "block" : "none";
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@vitest/coverage-istanbul": "^0.34.5",
"eslint": "^8.49.0",
"nyc": "^15.1.0",
"standard": "^17.1.0",
"vite": "^4.4.9",
Expand Down
Loading

0 comments on commit 25439a8

Please sign in to comment.