mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 18:45:06 +08:00
refactor: vue3 axios api ...
This commit is contained in:
@ -27,8 +27,8 @@ export const useValidator = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 不能有空格
|
||||
const notSpace = (val: any, callback: Callback, message: string) => {
|
||||
// 用户名不能有空格
|
||||
if (val.indexOf(' ') !== -1) {
|
||||
callback(new Error(message))
|
||||
} else {
|
||||
@ -36,8 +36,8 @@ export const useValidator = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 不能是特殊字符
|
||||
const notSpecialCharacters = (val: any, callback: Callback, message: string) => {
|
||||
// 密码不能是特殊字符
|
||||
if (/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/gi.test(val)) {
|
||||
callback(new Error(message))
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user