Let servers validate invalid input

This commit is contained in:
olaservo 2025-09-27 21:05:00 -07:00
commit 69c294c0ae

View file

@ -252,13 +252,19 @@ const ToolsTab = ({
[key]: undefined,
});
} else {
// Field has value - convert to number (never store strings)
// Field has value - try to convert to number, but store input either way
const num = Number(value);
if (!isNaN(num)) {
setParams({
...params,
[key]: num,
});
} else {
// Store invalid input as string - let server validate
setParams({
...params,
[key]: value,
});
}
}
}}