Newer
Older
Nanping_sponge_JXKH / src / views / spongePerformance / examinemanage / validate.js
@liyingjing’ liyingjing’ on 17 Nov 2023 259 bytes 1
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('请输入正整数'))
  }
}