瀏覽代碼

增加校验规则

yufei
余菲 9 月之前
父節點
當前提交
abfcf64bc3
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. +7
    -0
      utils/check.js

+ 7
- 0
utils/check.js 查看文件

@@ -4,4 +4,11 @@
export const isPositiveInteger = function(value) {
var re = /^[0-9]+$/ ;
return re.test(value)
}
/**
* 校验数字、字母或汉字
*/
export const isNoCharacters = function(value) {
var re = /^[\u4e00-\u9fa5_a-zA-z0-9]+$/ ;
return re.test(value)
}

Loading…
取消
儲存