title: How to make a password include at least one special character?
body: <p>The password field should be more than 8 characters and include at least one special characters. How to meet the 'at least one special character' requirement in AngularJS?</p>
  
  <pre><code>&lt;input type="password" name="pwd" data-ng-minlength="8" data-ng-model="user.pwd" /&gt;
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/36352562/how-to-add-password-validation-using-regular-expression-in-angularjs-according-t">How to add password validation using regular expression in angularjs according to certain criterion?</a></p>
  
  <p>This question is very helpful to me, but my password requirement is slightly difference, like no number is allowed in my password, and I want to seperate the length requirement and special character requirement if possible so I can tell users what is the exact error. And I just wonder where can I learn how to set up ng-pattern? For me, they look like random characters...like this one:</p>
  
  <pre><code>ng-pattern="/^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&amp;])[A-Za-z\d$@$!%*#?&amp;]{8,}$/"
  </code></pre>