diff --git a/src/lib/components/preparation/BarcodeForm.svelte b/src/lib/components/preparation/BarcodeForm.svelte index ed66765..b21cc63 100644 --- a/src/lib/components/preparation/BarcodeForm.svelte +++ b/src/lib/components/preparation/BarcodeForm.svelte @@ -30,7 +30,7 @@ for(let id of idList) { let element = document.getElementById(id); if(element instanceof HTMLInputElement){ - if(!(element.reportValidity())){ + if(!element.checkValidity()){ return false; } } diff --git a/src/lib/components/preparation/QrCodeForm.svelte b/src/lib/components/preparation/QrCodeForm.svelte index c72888f..76653ee 100644 --- a/src/lib/components/preparation/QrCodeForm.svelte +++ b/src/lib/components/preparation/QrCodeForm.svelte @@ -75,7 +75,7 @@ } for (let id of idList) { let element = document.getElementById(id); - if (element instanceof HTMLInputElement && !element.reportValidity()) { + if (element instanceof HTMLInputElement && !element.checkValidity()) { return false; } } @@ -216,7 +216,8 @@ id="distance{i}" type="number" bind:value={salivaDistances[i]} - on:input={salivaListChanged}/> + on:input={salivaListChanged} + required />