From 70450a877470c3408a9e33d41eda5d3e6145d3e0 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Thu, 23 Jan 2025 14:21:51 +0100 Subject: [PATCH] small fixes --- index.html | 8 ++++---- js/index.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a75f1e3..c6d6278 100644 --- a/index.html +++ b/index.html @@ -79,7 +79,7 @@
- +
@@ -87,7 +87,7 @@
- +
@@ -95,7 +95,7 @@
- + €
@@ -104,7 +104,7 @@
- +
diff --git a/js/index.js b/js/index.js index c318ee5..4145972 100644 --- a/js/index.js +++ b/js/index.js @@ -95,7 +95,8 @@ validateIban = (target) => { } validateAmount = (target) => { - if (parseFloat(target.value) > 0) { + if (parseFloat(target.value) > 0 && target.value.toString() === parseFloat(target.value).toFixed(2).toString()) { + target.value = parseFloat(target.value).toFixed(2); target.classList.remove("is-danger") document.querySelector("#amount div span.is-right").innerHTML = "✅"; } else {