]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/SearchSectionReverse.svelte
validate countrycodes, lat, lon fields even when hidden (#109)
[nominatim-ui.git] / src / components / SearchSectionReverse.svelte
index d996f440d2faca35b6f81dc20b75316e652cb379..aca422d786bdc1510fe8fb351eea3871410fb22f 100644 (file)
@@ -44,6 +44,7 @@
            type="text"
            class="form-control form-control-sm"
            placeholder="latitude"
            type="text"
            class="form-control form-control-sm"
            placeholder="latitude"
+           pattern="^-?\d+(\.\d+)?$"
            bind:value={lat}
            on:change={maybeSplitLatitude} />
   </div>
            bind:value={lat}
            on:change={maybeSplitLatitude} />
   </div>
@@ -60,6 +61,7 @@
            type="text"
            class="form-control form-control-sm"
            placeholder="longitude"
            type="text"
            class="form-control form-control-sm"
            placeholder="longitude"
+           pattern="^-?\d+(\.\d+)?$"
            bind:value={lon} />
   </div>
   <div class="form-group">
            bind:value={lon} />
   </div>
   <div class="form-group">