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 />
min
{/each} @@ -232,7 +233,8 @@ id="time{i}" type="time" bind:value={salivaTimes[i]} - on:input={salivaListChanged}/> + on:input={salivaListChanged} + required /> {/each} diff --git a/src/lib/components/preparation/StudyForm.svelte b/src/lib/components/preparation/StudyForm.svelte index d055239..15c9a13 100644 --- a/src/lib/components/preparation/StudyForm.svelte +++ b/src/lib/components/preparation/StudyForm.svelte @@ -17,7 +17,7 @@ $: $studyProps, studyPropsValid.set(isValid()); function isValid(){ - let permanentIdList = ["study_name", "num_days", "num_samples", "pref_bio"] + let permanentIdList = ["study_name", "num_days", "num_samples", "prefix_bio"] let optionalIdList = ["num_participants"] if (!validateInputsFromList(permanentIdList)){ return false; @@ -41,7 +41,7 @@ for(let id of list) { let element = document.getElementById(id); if(element instanceof HTMLInputElement){ - if(!(element.reportValidity())){ + if(!(element.checkValidity())) { return false; } }