title: Laravel 5 Unique Validation Not Working
body: <p>I'm new to Laravel 5, supposed I have firstname and surname field on my database. I have this validation?</p>
  
  <pre><code>public function create()
  {
  
      $rules = array(
          'firstname'         =&gt; 'required:unique',
          'surname'           =&gt; 'required:unique',
          'phoneno'           =&gt; 'required',
          'mcmillan'          =&gt; 'required',
          'hri'               =&gt; 'required',
          'diabetes'          =&gt; 'required',
          'breastcancer'      =&gt; 'required',
          'gpt'               =&gt; 'required',
      );
  
      $validator = Validator::make(Input::all(), $rules);
  
      // Check if all fields is filled
      if ($validator-&gt;fails()) 
      {
          return Redirect::to('brk')-&gt;withErrors($validator);
      }
      else
      {
          $flag = Input::get('flag');
  
          /* If version 2 (Opt In) */
          if($flag == "1")
          {
              if(Input::get('opt') != "")
              {
                  $optMethod = Input::get('opt');
              }
              else
              {
                  $optMethod = 'OptOut';
              }
          }
          else if($flag == "0") /* If version 1 (Opt Out) */
          {
              if(Input::get('opt') != "")
              {
                  $optMethod = Input::get('opt');
              }
              else
              {
                  $optMethod = 'OptIn';
              }
          }
  
          $firstname      = Input::get('firstname');
          $surname        = Input::get('surname');
          $phoneno        = Input::get('phoneno');
          $mcmillan       = Input::get('mcmillan');
          $hri            = Input::get('hri');
          $diabetes       = Input::get('diabetes');
          $breastcancer   = Input::get('breastcancer');
          $gpt            = Input::get('gpt');
  
          $brk = new \App\Http\Models\BrkDailyMail;
          $brk-&gt;firstname            = $firstname;
          $brk-&gt;surname              = $surname;
          $brk-&gt;phoneno              = $phoneno;
          $brk-&gt;mcmillan             = $mcmillan;
          $brk-&gt;hri                  = $hri;
          $brk-&gt;diabetes             = $diabetes;
          $brk-&gt;breastcancer         = $breastcancer;
          $brk-&gt;gpt                  = $gpt;
          $brk-&gt;OptMethod             = $optMethod;
          $brk-&gt;hostname             = Request::root().'/brk';
          $brk-&gt;save();
          Session::flash('alert-success', 'Form Submitted Successfully.');
          /* If version 2 (Opt In) */
          if($flag == "1")
          {
              return Redirect::to('brk2');
          }
          else if($flag == "0") /* If version 1 (Opt Out) */
          {
              return Redirect::to('brk');
          }
  
      }
  
  }
  </code></pre>
  
  <p>and the form is still submitting? what could be the problem? seems the validation won't work?</p>
  
  <p>The form should make some errors right? but it still inserting in the database</p>