const blurText = async (rule, value, callback) => { const boolean = new RegExp('^[1-9][0-9]*$').test(value) // console.log(boolean) if (! Boolean) {this.$message. Warning (' please enter positive integer ') let name = rule-field this.prizeObj[name] = "return}} rules: {giftMidVal: [{required: true, message: 'Please input amount ', trigger: 'blur',}, {validator: blurdecimal, trigger: 'blur'},],}Copy the code

When the input box needs to be checked carefully, you can add a check function, which mainly uses the re to check the content. You can empty the input box when the verification is not qualified. Ensure the data pass verification when submitting