title: make a rule about input to accept empty string and specific number of chars
body: <p>How can I make a rule about input to accept only two condition:</p>
  <ul>
  <li>the input must be only 5 chars.</li>
  <li>the input can accept empty string.</li>
  </ul>
  <p>What I've did so far:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
   data: () =&gt; ({
     code:"",
     rules: {
          codeRules: (v) =&gt;(v ?? "").trim().length == 5 ||"code must be 5 chars!"
     }
   }),
   methods: {
      checkCode(){
        if (this.$refs.form.validate()) {
            alert('Everything goes well!')
        }
      }
   }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdn.jsdelivr.net/npm/vuetify@1.2.2/dist/vuetify.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdn.jsdelivr.net/npm/vuetify@1.2.2/dist/vuetify.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="app"&gt;
    &lt;v-app&gt;
      &lt;v-form ref="form" lazy-validation&gt;
        &lt;v-container bg fill-height grid-list-md text-xs-center&gt;
           &lt;v-row&gt;
              &lt;v-col cols="6"&gt;
                &lt;v-text-field
                  label="Code"
                  v-model="code"
                  :rules="[rules.codeRules]"
                &gt;&lt;/v-text-field&gt;
              &lt;/v-col&gt;
           &lt;/v-row&gt;
           &lt;v-row&gt;
              &lt;v-col cols="6"&gt;
                &lt;v-btn color="blue darken-1" @click="checkCode"&gt;Ok
            &lt;/v-btn&gt;
              &lt;/v-col&gt;
           &lt;/v-row&gt;
        &lt;/v-container&gt;
      &lt;/v-form&gt;
    &lt;/v-app&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>First condition I've accomplish, <strong>BUT</strong> How can I let the input accept also empty string!</p>