修复RegexPool.CHINESE_NAME范围太大的问题

This commit is contained in:
Looly
2024-09-03 18:04:39 +08:00
parent f1bc355ff0
commit 7e83369205
3 changed files with 15 additions and 3 deletions

View File

@@ -221,5 +221,5 @@ public interface RegexPool {
* 总结中文姓名2-60位只能是中文和维吾尔族的点·
* 放宽汉字范围:如生僻姓名 刘欣䶮yǎn
*/
String CHINESE_NAME = "^[\u2E80-\u9FFF·]{2,60}$";
String CHINESE_NAME = "^[\u4E00-\u9FFF·]{2,60}$";
}

View File

@@ -0,0 +1,11 @@
package cn.hutool.core.lang;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class IssueIAOGDRTest {
@Test
void isChineseNameTest() {
Assertions.assertFalse(Validator.isChineseName("张三。"));
}
}