How to write vee-validate, regular check rules?

use vee-validate "s regular verification rules in vue projects. The backend returns tailZeroCount, and then dynamically generates regular expressions, as follows:

 regexRule() {
    let tailZeroCount = this.warePublishData.warePublishVO.tailZeroCount ? this.warePublishData.warePublishVO.tailZeroCount : 3
    return /^[0-9]*[0]{`tailZeroCount`}$/
}

<input type="text" v-validate="{
       required: true,
       regex: regexRule
}"/>

but the printed regexRule is still / ^ [0-9] * [0] { tailZeroCount } $/

Mar.02,2021

let tailZeroCount = this.warePublishData.warePublishVO.tailZeroCount ? this.warePublishData.warePublishVO.tailZeroCount : 3
let regex = new RegExp("^[0-9]*[0]{" + tailZeroCount + "}$");
return regex
Menu