Replaced the regular expression replace with trimEnd() in the validateNote validator in the JavaScript for the transaction form.

This commit is contained in:
依瑪貓 2023-02-27 16:03:25 +08:00
parent 488e72679e
commit 0f6c23e1f3

View File

@ -825,7 +825,7 @@ function validateNote() {
const error = document.getElementById("accounting-note-error");
field.value = field.value
.replace(/^\s*\n/, "")
.replace(/\s+$/, "");
.trimEnd();
field.classList.remove("is-invalid");
error.innerText = "";
return true;