diff --git a/components/GameAppealCard.tsx b/components/GameAppealCard.tsx
index 2e752e5..5606494 100644
--- a/components/GameAppealCard.tsx
+++ b/components/GameAppealCard.tsx
@@ -118,22 +118,24 @@ export default function (props: GameAppealProps & { port?: MessagePort }) {
const value = (e.target as EventTarget & { value: string })
.value;
- return (
- Boolean(value.match(/^-?\d{0,3}$/)) ||
- value === "-" ||
- !value
- );
+ if (value !== "-" && value && !value.match(/^-?\d{0,3}$/))
+ e.preventDefault();
}}
onChange={(e) => setPercentage(parseInt(e.target.value))}
+ pattern="/^-?\d{0,3}$/"
placeholder="Reduction factor"
/>
-
- Stat multiplication factors:
-
-
- Money: {Math.min(0.1 * percentage, 1)}
- Parts: {Math.min(0.6 * percentage, 1)}
- Derby Wins: {Math.min(0.6 * percentage, 1)}
+ Stat multiplication factors:
+
+
+ Money: {Math.min(0.1 * percentage, 1).toFixed(2)}
+
+
+ Parts: {Math.min(0.6 * percentage, 1).toFixed(2)}
+
+
+ Derby Wins: {Math.min(0.6 * percentage, 1).toFixed(2)}
+