fix: close documented platform polish gaps

This commit is contained in:
hectorzhao
2026-07-11 18:20:38 +08:00
parent 6236547871
commit 2ecbb920a6
25 changed files with 193 additions and 110 deletions
+2 -2
View File
@@ -1417,8 +1417,8 @@ function normalizeExtensionDigits(value: unknown) {
return 0;
}
const normalized = Number(value);
if (![0, 2, 4, 6].includes(normalized)) {
throw new BadRequestException('extensionDigits must be one of 0, 2, 4, or 6');
if (!Number.isInteger(normalized) || normalized < 0 || normalized > 20) {
throw new BadRequestException('extensionDigits must be an integer between 0 and 20');
}
return normalized;
}