title: Validating a password input that contains arabic characters using Javascript
body: <p>I currently validate my english based password field using the following method which contains a regex pattern.</p>
  
  <pre><code>/**
   * Validates password based on following rules: 
   * Must contain a lowercase letter
   * Must contain a Uppercase letter
   * Must contain a number
   * Must be longer than 8 chars
   * Can contain special chars
   */
  exports.isValidPassword = function (password) {    
      var pattern = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$/;
      var result = pattern.test(password);
      return result;
  };
  </code></pre>
  
  <p>I have a new requirement in which I need to support Arabic languages, how could I accomplish this while still keeping my current rules? I have seen in the past where people put <code>{arabic}</code> in the regex pattern, but I'm not sure if that's the right approach for my case. </p>