diff --git a/Myshipping.Core/Util/JsonUtil.cs b/Myshipping.Core/Util/JsonUtil.cs index 3974e583..a0531ead 100644 --- a/Myshipping.Core/Util/JsonUtil.cs +++ b/Myshipping.Core/Util/JsonUtil.cs @@ -196,22 +196,19 @@ public static class JsonUtil prop.SetValue(model, sourceVal.ToString().Replace("’", "'")); prop.SetValue(model, sourceVal.ToString().Replace("、", ",")); prop.SetValue(model, sourceVal.ToString().Replace(" ", " ")); - if (Regex.IsMatch(sourceVal.ToString(), @"[\u4e00-\u9fa5]")&& propName.ToUpper() == "MBLNO") + if (Regex.IsMatch(sourceVal.ToString(), @"^[a-zA-Z0-9]+$") && propName.ToUpper() == "MBLNO") { - return "提单号存在中文字符"; - + return "提单号存在中文字符或特殊字符"; } if (Regex.IsMatch(sourceVal.ToString(), @"[\u4e00-\u9fa5]") && propName.ToUpper() == "HBLNO") { return "分提单号存在中文字符"; - } if (Regex.IsMatch(sourceVal.ToString(), @"[\u4e00-\u9fa5]") && propName.ToUpper() == "VESSEL") { return "船名存在中文字符"; - } if (Regex.IsMatch(sourceVal.ToString(), @"[\u4e00-\u9fa5]") && propName.ToUpper() == "VOYNO") {