]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/UrlSubmitForm.svelte
Details page: Use osm type and it as placeholder for unnamed places (#121)
[nominatim-ui.git] / src / components / UrlSubmitForm.svelte
index 975e79fc2fa61780e367acbecd1e5516bffc2a9a..220736133547babf95337a7a7b602385082619fa 100644 (file)
@@ -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
   }