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 {