optimize
wet 1 year ago
parent 53318f16b4
commit 85cb4b0aa3

@ -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")
{

Loading…
Cancel
Save