X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b3f82d79148184cdb999f9a64f20fce34c3b8dad..0be37383d730a360a81aad1c5e58a9e9a64a6515:/src/components/UrlSubmitForm.svelte?ds=sidebyside

diff --git a/src/components/UrlSubmitForm.svelte b/src/components/UrlSubmitForm.svelte
index 975e79f..2207361 100644
--- a/src/components/UrlSubmitForm.svelte
+++ b/src/components/UrlSubmitForm.svelte
@@ -22,7 +22,9 @@
   // doesn't support hidden fields, so we check those in an extra step
   function validate_field(field) {
     if (field.type === 'hidden') {
-      if (field.pattern && !field.value.match(field.pattern)) return false;
+      if (field.value.length) {
+        if (field.pattern && !field.value.match(field.pattern)) return false;
+      }
     }
     return field.checkValidity(); // for hidden field always true
   }
