title: How do you conditional bind v-model in Vue?
body: <p>In JavaScript, object can optional spread value like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>const payload = {
    name: "Joseph",
    ...(isMember &amp;&amp; { credential: true })
  };
  </code></pre>
  
  <p>In React, JSX can optional pass props like this:</p>
  
  <pre><code>&lt;Child {...(editable &amp;&amp; { editable: editableOpts })} /&gt;
  </code></pre>
  
  <p>Now in Vue, how do I achieve optional <code>v-model</code>?</p>
  
  <p>I have a textarea like this</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;template&gt;
    &lt;textarea v-model="textValue"&gt; &lt;!-- How can I optional bind v-model? --&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>How can I achieve optional bind <code>v-model</code>?</p>
  
  <p>I want to do this because I want to show warning on that textarea when error occurs.</p>
  
  <p>When error occurs, textarea shows the warning and clear the input (the <code>v-model</code>)</p>