]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/SearchSection.svelte
Validate countrycodes (#108)
[nominatim-ui.git] / src / components / SearchSection.svelte
index 207af21ff20d613994f9c73acc60497b17d4a28b..d321eb4c3be1ebc52b4f98c9faf151a0b42dc1e8 100644 (file)
     </li>
 
     <li>
-      <label for="option_ccode">Countries</label>
+      <label for="option_ccode">Country Codes</label>
       <input type="text" placeholder="e.g. de,gb" class="form-control form-control-sm d-inline w-auto api-param-setting"
-             data-api-param="countrycodes" id="option_ccode" size="15"
+             data-api-param="countrycodes" id="option_ccode" size="15" pattern="[a-zA-Z]{2}(,[a-zA-Z]{2})*"
              value="{api_request_params.countrycodes || ''}"
              on:change={set_api_param}>
     </li>