rule{
变量: [
{ required: true, validator: validateparamPosition, trigger: 'blur' }] }
var validateparamPosition = (rule, value, callback) => {
if (!value) { //先判断空可以过
callback()
} else {
if (/(^[0-9]\d*$)/.test(value)) { //验证正整数和0的正则
callback()
} else {
callback(new Error('可以为空或正整数或0'))
}
}
}