From: Michael Orlitzky Date: Fri, 3 Nov 2023 17:49:24 +0000 (-0400) Subject: index.html.in: display a special error message if origin == destination X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a339ad74bd891f2fbdecce6fb3f1784ff207f1da;p=charm-bypass.git index.html.in: display a special error message if origin == destination --- diff --git a/index.html.in b/index.html.in index ac8b2be..50131b7 100644 --- a/index.html.in +++ b/index.html.in @@ -830,7 +830,11 @@ x.setCustomValidity(''); }) - if (compute_marc_zone(src.value, dest.value) === null) { + if (src.value === dest.value) { + let err = "Origin and destination are the same!"; + dest.setCustomValidity(err); + } + else if (compute_marc_zone(src.value, dest.value) === null) { let err = "Origin and destination are on different lines!"; dest.setCustomValidity(err); }