title: How do I validate with number and regex in vue js?
body: <p>I have to validate textbox accepting only numeric value and number must start with 7 or 8 or 9 (regex).</p>
  <p>I have already done maxlength, minlength and required rule. Which are perfectly working fine. But I don't know how to validate with only accepts number and regex. I have tried some of the syntaxes but not working.</p>
  <pre><code>&lt;tab-content title=&quot;RELATIONSHIP DETAILS&quot; icon=&quot;ti-info-alt&quot; :before-change=&quot;validateFirstStep&quot;&gt;
  &lt;el-form :inline=&quot;true&quot; :model=&quot;formInline1&quot; class=&quot;demo-form-inline&quot; :rules=&quot;rules1&quot; ref=&quot;ruleForm1&quot;&gt;
  &lt;el-form-item label=&quot;Mobile Number&quot; prop=&quot;mobno&quot;&gt;
            &lt;el-input maxlength=&quot;10&quot; v-model=&quot;formInline1.mobno&quot; placeholder=&quot;Mobile Number&quot;&gt;&lt;/el-input&gt;
          &lt;/el-form-item&gt;
  
  &lt;/el-form&gt;
  
      &lt;/tab-content&gt;
  
  &lt;script&gt;
  const app= new Vue({
     el: '#app',
       data() {
         return {
           formInline1: {
  mobno:'',
  },
           rules1: {
   mobno: [{
               required: true,
               message: 'Please enter Mobile Number',
               trigger: 'blur'
             }, {
               min: 10,
               max: 10,
               message: 'Length must be 10',
               trigger: 'blur'
             }],
  }
         },
         methods: {
           onComplete: function() {
             alert('Yay. Done!');
           },
  validateFirstStep() {
             return new Promise((resolve, reject) =&gt; {
               this.$refs.ruleForm1.validate((valid) =&gt; {
                 resolve(valid);
               });
             })
           },
  }
    })
  &lt;/script&gt;
  </code></pre>