Newer
Older
Nanping_sponge_JXKH / src / views / management / validate.js
@liyingjing liyingjing on 25 Oct 2023 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('请输入正整数'))
  }
}