el-input can only enter prices, the price of a regular judge

<el-form :model="ruleForm" :rules="rules" ref="ruleForm">

   <el-form-item prop="allPayeeMoney">

          <el-input type="number" step="0.01" v-model="ruleForm.allPayeeMoney" autocomplete="off"></el-input>

   </el-form-item>

<el-form>

 

data(){

return {

     ruleForm: {

             allPayeeMoney

     }

}

rules : {

      yeeMoney: [

             {Required: true, message: 'Please fill in the correct amount, rounded to two decimal places', pattern: [. \] / (^ [\ D] | | ^ [1-9] [\ d] *) ($ [ \ d] {0,2} $) /}

       ]

},

Guess you like

Origin blog.csdn.net/weixin_41760500/article/details/90513689