From a339ad74bd891f2fbdecce6fb3f1784ff207f1da Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 3 Nov 2023 13:49:24 -0400 Subject: [PATCH] index.html.in: display a special error message if origin == destination --- index.html.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- 2.44.2