|
|
@ -265,8 +265,8 @@ const trimAddJwcode = (value) => { |
|
|
|
|
|
|
|
// 添加处理用户名输入的函数 |
|
|
|
const trimUsername = (value) => { |
|
|
|
// 只允许中文、英文字符 |
|
|
|
const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z]/g, ''); |
|
|
|
// 只允许中文、英文字符、0-9 |
|
|
|
const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, ''); |
|
|
|
// 限制最长30个字符 |
|
|
|
addObj.value.username = filteredValue.slice(0, 30); |
|
|
|
} |
|
|
|