tranbox...

This commit is contained in:
Gabe Yuan
2023-10-24 17:58:37 +08:00
parent 4125aba808
commit 02f26af592
9 changed files with 274 additions and 35 deletions

View File

@@ -223,3 +223,13 @@ export const matchInputStr = (str, sign) => {
}
return str.match(reg);
};
/**
* 判断是否英文单词
* @param {*} str
* @returns
*/
export const isValidWord = (str) => {
const regex = /^[a-zA-Z-]+$/;
return regex.test(str);
};