X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b3f82d79148184cdb999f9a64f20fce34c3b8dad..9106292ade3ec53e568287c5d72daa0ec7eb9e30:/src/components/UrlSubmitForm.svelte 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 }