Revised the text messages in the account form in the accounting application.

This commit is contained in:
2020-08-09 12:17:07 +08:00
parent 724ba44a71
commit 06631d2df1
5 changed files with 289 additions and 223 deletions

View File

@ -118,9 +118,9 @@ function validateCode() {
errorMessage.text(gettext("Please fill in the code."));
return false;
}
if (!code.value.match(/^[1-9][0-9]*$/)) {
if (!code.value.match(/^[1-9]+$/)) {
code.classList.add("is-invalid");
errorMessage.text(gettext("You can only use a number as the code"));
errorMessage.text(gettext("You can only use numbers 1-9 in the code."));
return false;
}
const originalCode = $("#account-code-original").val();