Browse Source

修改SN码校验

zhengjinyi 10 months ago
parent
commit
80ccc46c57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/validate.js

+ 1 - 1
src/utils/validate.js

@@ -100,7 +100,7 @@ export function isMobile(arg) {
  * @returns {Boolean}
  */
 export function isSnCode(arg) {
-  const reg = /^[a-z|A-Z|0-9]+$/
+  const reg = /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/
   return reg.test(arg)
 }