fix(frontend): add missing required argument to correctly compute isValue (#1807)

This commit is contained in:
Faton Ramadani
2023-07-07 15:19:25 +02:00
committed by GitHub
parent b24ad84787
commit 9a9f7f690d
+2 -2
View File
@@ -138,7 +138,7 @@
}
}
function validateInput(pattern: string | undefined, v: any): void {
function validateInput(pattern: string | undefined, v: any, required: boolean): void {
if (required && (v == undefined || v == null || v === '')) {
error = 'Required'
valid = false
@@ -175,7 +175,7 @@
let customValue = false
$: validateInput(pattern, value)
$: validateInput(pattern, value, required)
</script>
<!-- svelte-ignore a11y-autofocus -->