X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b3f82d79148184cdb999f9a64f20fce34c3b8dad..a626c30095620f913366ef2c7db705f66ecdb988:/src/components/UrlSubmitForm.svelte diff --git a/src/components/UrlSubmitForm.svelte b/src/components/UrlSubmitForm.svelte index 975e79f..a3dfaa0 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 } @@ -44,5 +46,7 @@