title: Vue setting 2 conditions with v-if
body: <p>I'm practicing Vue and got problem, is it possible to set 2 conditions using v-if? I mean this is my code:   </p>
  
  <p>So basically is it possible to set two conditions using &amp;&amp; or it should be done some different way?</p>
  
  <p>UPDATED FULL CODE:</p>
  
  <p>I tried 3 methods, inside template, methods and computed methods, all of them check only one condition</p>
  
  <p>with your help guys I kinda modified it and now it works! Thank you all so much for help but there is last thing, in console log it shows me: "Uncaught TypeError: _vm.validated is not a function",
   it is shown doesn't matter if validation is correct or not</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id='add-blog'&gt;
        &lt;h2&gt;Add news Blog Post&lt;/h2&gt;
        &lt;form v-if='is_validated'&gt;
            &lt;label&gt;User&lt;/label&gt;
            &lt;input type='text' v-model.lazy='user' required /&gt;
            &lt;label&gt;Password&lt;/label&gt;
            &lt;input type='password' v-model.lazy='password' required /&gt;
            &lt;button v-on:click.prevent='validated'&gt;Check me&lt;/button&gt;
        &lt;/form&gt;
        &lt;div v-else&gt;
            &lt;p&gt;error&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  export default {
    components: {},
    data() {
      return {
        user: "",
        password: "",
        is_validated: true,
      };
    },
    computed: {
      validated() {
        if (this.user == 'name' &amp;&amp;  this.password == '111') {
            return this.is_validated = false;
        }
      }
    },
  };
  &lt;/script&gt;
  </code></pre>