|
@@ -238,7 +238,19 @@ class Model_logic_order extends Lin_Model {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ if($post['country'] == 192 )
|
|
|
+ {
|
|
|
+ //如果国家是美国 邮编只能是字符串为5位的数字
|
|
|
+ $pattern = '/^\d{5}$/';
|
|
|
+ if(!preg_match($pattern, $post['zipcode'])){
|
|
|
+ return [
|
|
|
+ 'code'=>-1,
|
|
|
+ "msg"=>"美国的邮编需按5位数格式提交!"
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
// if(in_array($post['express'],[2,63,64])){
|
|
|
// if($post['type'] != 5){
|
|
|
// return [
|