test: add normalized ASN validation coverage

This commit is contained in:
copilot-swe-agent[bot]
2026-06-16 23:48:28 +00:00
committed by GitHub
parent f3a52e31d1
commit 7c15c428b3
3 changed files with 17 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ export function getResourceRuleValueValidationError(
: "Invalid country code provided";
case "ASN":
const normalizedValue = value.trim().toUpperCase();
return /^AS\d+$/i.test(normalizedValue) ||
return /^AS\d+$/.test(normalizedValue) ||
normalizedValue === "ALL" ||
normalizedValue === "AS0"
? null