在验证器中增加了针对中文字符检测的验证规则

This commit is contained in:
bison
2016-07-15 09:49:00 +08:00
parent ac22922c09
commit 3387f7389b

View File

@@ -534,7 +534,7 @@ class Validate
break;
case 'chsDash':
// 只允许汉字、字母、数字和下划线_及破折号-
$result = $this->regex($value, '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u/');
$result = $this->regex($value, '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u');
break;
case 'activeUrl':
// 是否为有效的网址