title: Laravel password validation rule
body: <p>How to added password validation rule in the validator?</p>
  
  <p><strong>Validation rule:</strong></p>
  
  <p>The password contains characters from at least three of the following five categories:</p>
  
  <ul>
  <li>English uppercase characters (A – Z)</li>
  <li>English lowercase characters (a – z)</li>
  <li>Base 10 digits (0 – 9)</li>
  <li>Non-alphanumeric (For example: !, $, #, or %)</li>
  <li>Unicode characters</li>
  </ul>
  
  <p>How to add above rule in the validator rule?</p>
  
  <p><strong>My Code Here</strong></p>
  
  <pre><code>// create the validation rules ------------------------
      $rules = array(
          'name'             =&gt; 'required',                        // just a normal required validation
          'email'            =&gt; 'required|email|unique:ducks',     // required and must be unique in the ducks table
          'password'         =&gt; 'required',
          'password_confirm' =&gt; 'required|same:password'           // required and has to match the password field
      );
  
      // do the validation ----------------------------------
      // validate against the inputs from our form
      $validator = Validator::make(Input::all(), $rules);
  
      // check if the validator failed -----------------------
      if ($validator-&gt;fails()) {
  
          // get the error messages from the validator
          $messages = $validator-&gt;messages();
  
          // redirect our user back to the form with the errors from the validator
          return Redirect::to('home')
              -&gt;withErrors($validator);
  
      }
  </code></pre>