(pl)(census) fix age not validating correctly

This commit is contained in:
Andrea Vos 2025-01-13 22:23:34 +01:00
parent e517ceac78
commit 92cfb1994c

View File

@ -110,7 +110,7 @@ const stepValid = computed((): boolean => {
return Array.isArray(answer) && answer.length > 0;
}
if (question.value.type === 'number') {
const v = typeof answer === 'string' ? parseInt(answer) : -1;
const v = parseInt(answer as string);
return answer !== '' && v >= question.value.min && v <= question.value.max;
}
if (question.value.type === 'text' || question.value.type === 'textarea') {