mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
在验证器中增加了针对中文字符检测的验证规则
This commit is contained in:
@@ -534,7 +534,7 @@ class Validate
|
|||||||
break;
|
break;
|
||||||
case 'chsDash':
|
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;
|
break;
|
||||||
case 'activeUrl':
|
case 'activeUrl':
|
||||||
// 是否为有效的网址
|
// 是否为有效的网址
|
||||||
|
|||||||
Reference in New Issue
Block a user