Skip to content

Commit

Permalink
Update app/assets/javascripts/components/input_table.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot <[email protected]>
  • Loading branch information
jorg-vr and Copilot authored Nov 20, 2024
1 parent c3515e3 commit fe65e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/input_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit fe65e92

Please sign in to comment.