title: Using hasClass with vue.js
body: <p>I know this setup I have isn't ideal however I need to check the class of an input element. I have just started using Vue.js on a new project however we have a form validation library that has to be used that uses jQuery.</p>
  
  <p>The validation library I am using adds a class to an input if it doesn't fit some validation requirements.</p>
  
  <p>If I was using jQuery I could just use hasClass to check if the input element had a specific class.</p>
  
  <p>In Vue I am unsure how I can check if an element has a class though?</p>
  
  <p>Here is an example method of what I'd like to achieve:</p>
  
  <pre><code>      methods: {
          nextStep: function() {
            const element = this.$el.querySelector("#conversation__tram-1 input");
            if (element has the class of is-valid) {
              Do something
            }
  
          },
        },
  </code></pre>
  
  <p>As you can see I'd like to check whether or not the input field has a class of <code>is-valid</code>. Can you think of any way I can do this with Vue.js? Thanks.</p>