0312 区分取名和聊天的特殊符号屏蔽;其他看表配置
| | |
| | | return false; |
| | | } |
| | | |
| | | if (DirtyWordConfig.IsDirtWord(info) || UIHelper.HasSpecialCharac(info) |
| | | if (DirtyWordConfig.IsDirtWord(info) || UIHelper.HasSpecCheckChat(info) |
| | | || DirtyNameConfig.IsDirtName(info)) |
| | | { |
| | | errorCode = 3; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 取名验证 |
| | | static Regex s_SpecialCharacterRegex = new Regex("[()()@!#$%^&*[]|_]"); |
| | | static Regex s_AsciiCharacterRegex = new Regex("[\x00-\x1F]|[\x21-\x2F]|[\x3A-\x40]|[\x5B-\x60]|[\x7B-\x7E]"); |
| | | public static bool HasSpecialCharac(string str) |
| | |
| | | return false; |
| | | } |
| | | |
| | | //聊天 |
| | | static Regex s_AsciiCharacterRegexChat = new Regex("[\x00-\x1F]"); |
| | | public static bool HasSpecCheckChat(string str) |
| | | { |
| | | if (s_AsciiCharacterRegexChat.IsMatch(str)) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | // 检查字符串是不是纯整数 |
| | | public static bool IsNumeric(string input) |
| | | { |