Skip to content
Snippets Groups Projects

Resolve "Extra work "reason" not limited in length"

Files

@@ -327,7 +327,7 @@ function declarationSubmit() {
} else if (isDurationGreaterThanRemainder(timeEl.value)) {
document.getElementById("new-declaration-time-remaining-error").classList.remove("hidden");
timeEl.focus();
} else if (reasonEl.value == null || reasonEl.value === "") {
} else if (reasonEl.value || reasonEl.value.length < 10 || reasonEl.value.length > 140) {
document.getElementById("new-declaration-reason-error").classList.remove("hidden");
reasonEl.focus();
} else {
Loading