From fe65e92dba0ca7cbfb748c80722fac6bbd577bb8 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Wed, 20 Nov 2024 15:21:25 +0100 Subject: [PATCH] Update app/assets/javascripts/components/input_table.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/assets/javascripts/components/input_table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/input_table.ts b/app/assets/javascripts/components/input_table.ts index 948ca0bd8f..0e62074bc0 100644 --- a/app/assets/javascripts/components/input_table.ts +++ b/app/assets/javascripts/components/input_table.ts @@ -226,7 +226,7 @@ export class ScoreItemInputTable extends DodonaElement { } // Check if maximum is a positive number < 1000 // we use a regex instead of parseFloat because parseFloat is too lenient - if (! /^\d{1,3}(\.\d*)?$/.test(item.maximum) || parseFloat(item.maximum) <= 0) { + if (!/^\d{1,3}(\.\d+)?$/.test(item.maximum) || parseFloat(item.maximum) <= 0) { invalidCells.push("D" + row); } });