Check for invalid grids in qrbCalc

这个提交包含在:
phl0 2023-08-24 18:12:55 +02:00
父节点 61e2461646
当前提交 2bd09d31e1
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -362,6 +362,10 @@ function calculateQrb() {
} }
function validateLocator(locator) { function validateLocator(locator) {
vucc_gridno = locator.split(",").length;
if(vucc_gridno == 3 || vucc_gridno > 4) {
return false;
}
if(locator.length < 4 && !(/^[a-rA-R]{2}[0-9]{2}[a-xA-X]{0,2}[0-9]{0,2}[a-xA-X]{0,2}$/.test(locator))) { if(locator.length < 4 && !(/^[a-rA-R]{2}[0-9]{2}[a-xA-X]{0,2}[0-9]{0,2}[a-xA-X]{0,2}$/.test(locator))) {
return false; return false;
} }