@@ 1341-1345 (lines=5) @@ | ||
1338 | case CarruerType::Member: |
|
1339 | break; |
|
1340 | // 載具類別為買受人自然人憑證(Citizen)時,請設定自然人憑證號碼,前2碼為大小寫英文,後14碼為數字 |
|
1341 | case CarruerType::Citizen: |
|
1342 | if (! preg_match('/^[a-zA-Z]{2}\d{14}$/', $arExtend['CarruerNum'])) { |
|
1343 | array_push($arErrors, 'Invalid CarruerNum.'); |
|
1344 | } |
|
1345 | break; |
|
1346 | // 載具類別為買受人手機條碼(Cellphone)時,請設定手機條碼,第1碼為「/」,後7碼為大小寫英文、數字、「+」、「-」或「.」 |
|
1347 | case CarruerType::Cellphone: |
|
1348 | if (! preg_match('/^\/{1}[0-9a-zA-Z+-.]{7}$/', $arExtend['CarruerNum'])) { |
|
@@ 1347-1351 (lines=5) @@ | ||
1344 | } |
|
1345 | break; |
|
1346 | // 載具類別為買受人手機條碼(Cellphone)時,請設定手機條碼,第1碼為「/」,後7碼為大小寫英文、數字、「+」、「-」或「.」 |
|
1347 | case CarruerType::Cellphone: |
|
1348 | if (! preg_match('/^\/{1}[0-9a-zA-Z+-.]{7}$/', $arExtend['CarruerNum'])) { |
|
1349 | array_push($arErrors, 'Invalid CarruerNum.'); |
|
1350 | } |
|
1351 | break; |
|
1352 | ||
1353 | default: |
|
1354 | array_push($arErrors, 'Please remove CarruerNum.'); |