Newer
Older
KaiFengPC / src / views / preassess / examineManage / validate.js
@zhangdeliang zhangdeliang on 23 May 259 bytes 初始化项目
export const numberValidate = (rule, value, callback) => {
  if (value === '') {
    callback(new Error('分值不能为空'))
  } else {
    const reg = /^[1-9]+\d*$/
    if(reg.test(value)) callback()
    else callback(new Error('请输入正整数'))
  }
}