title: Writing a password validation form with javascript
body: <p>I am a beginning developer and have been trying to write a validation form using javascript. The validation popups don't seem to occur. Could someone please look at my code and tell me what I am missing?</p>
  
  <pre><code>&lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;meta name="udacity-grader" content="http://udacity.github.io/course-web-forms/lesson2/quizCustomValidity/grader/tests.json" libraries="jsgrader" unit-tests="http://udacity.github.io/course-web-forms/lesson2/quizCustomValidity/grader/unit_tests.js"&gt;
      &lt;title&gt;Quiz - setCustomValidity&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h3&gt;Create a new password&lt;/h3&gt;
      &lt;p&gt;Password should meet the following requirements:&lt;/p&gt;
      &lt;ul&gt;
          &lt;li&gt;16-100 characters (longer is better)&lt;/li&gt;
          &lt;li&gt;At least one of these symbols: !, @, #, $, %, ^, &amp;, *&lt;/li&gt;
          &lt;li&gt;At least one number&lt;/li&gt;
          &lt;li&gt;At least one lowercase letter&lt;/li&gt;
          &lt;li&gt;At least one uppercase letter&lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;label&gt;
          &lt;input id="first" type="password" placeholder="New password" min="16" max="100" autofocus&gt;
      &lt;/label&gt;
      &lt;label&gt;
          &lt;input id="second" type="password" min="16" max="100"placeholder="Repeat password"&gt;
      &lt;/label&gt;
      &lt;input id="submit" type="submit"&gt;
      &lt;script src="app.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  var firstPasswordInput = document.querySelector('#first');
  var secondPasswordInput = document.querySelector('#second');
  var submit = document.querySelector('#submit');
  
  submit.onclick = function() {
      if(firstPasswordInput != secondPasswordInput){
          secondPasswordInput.setCustomValidity('password does not match');
      }
      if (firstPasswordInput.includes('/[\!\@\#\$\%\^\&amp;\*]/g')== false)
      {    firstPasswordInput.setCustomValidity('password must include one of the following !@#$%^&amp;*');
      }
      if (firstPasswordInput.includes('/[0-9]/g')== false)
      {    firstPasswordInput.setCustomValidity('password must include a number');
      }
      if (firstPasswordInput.includes('/[a-z]/g')== false)
      {    firstPasswordInput.setCustomValidity('password must include a lowercase letter');
      }
      if (firstPasswordInput.includes('/[A-Z]/g')== false)
      {    firstPasswordInput.setCustomValidity('password must include an uppercase letter');
      }
      };  
  </code></pre>