verificationValue(value){
const gzNE = /^[0-9a-zA-Z]*$/
const gzN = /^[\d]+$/
const partN = value.substring(0, 4)
const partE = value.substring(4, 6)
if(gzNE.test(value) && gzN.test(partN) && partE == 'FD' && value.length > 6) {
return true
} else {
return false
}
// 1234FD1111112
if(this.verificationValue(this.completeMachineNo[0].machineNo) == false) {
this._message.warning('整机编号格式不正确~')
return
}
}
正则验证前四位是小数
最新推荐文章于 2024-06-23 12:17:11 发布