title: How do I validate a drop down list in Laravel PHP?
body: <p><strong>The Situation:</strong></p>
  
  <p>Under models, I've a <code>user.php</code> which handles all validation regarding adding a user to a website.</p>
  
  <p>This is (part of) the code:</p>
  
  <pre><code>public static $add_rules = array(
     'last_name'             =&gt; 'required',
     'first_name'            =&gt; 'required',
     'email'                 =&gt; 'required|unique:users,email',
     'username'              =&gt; 'required|alpha_num|min: 5|unique:users,username',
     'password'              =&gt; 'required|min: 4|same:password_confirmation',
     'password_confirmation' =&gt; 'required',
     'user_role'             =&gt; 'required|not_in:-- Choose User Type --'
  );
  </code></pre>
  
  <p><code>user_role</code> is the ID of the dropdown list, seen here:</p>
  
  <pre><code>&lt;select name="user_type_id" class="form-control" id="user_role"&gt;
  &lt;option value="0"&gt;-- Choose User Type --&lt;/option&gt;
  @if(Session::get("user_type") == "superuser")
       {
       @foreach($user_types as $ut)
           &lt;option value="{{$ut['id']}}"&gt;
               {{ ucwords($ut["user_type"]) }}
           &lt;/option&gt;
       @endforeach
       }
  @else{
       &lt;option value="Regular"&gt;Regular&lt;/option&gt;
  }@endif
  &lt;/select&gt;
  </code></pre>
  
  <p>Basically, what happens up there is that the drop down list is filled with user types, whatever they are. But it always has the first 'option' of <code>-- Choose User Type --</code>.</p>
  
  <p><strong>The Problem:</strong></p>
  
  <p>Problem is, the user can go with that option and add a user. I have a javascript code that blocks this and outputs an error message in a pop-up window, but it's ugly, and not consistent with the rest of the website's error messages.</p>
  
  <p>So I added it to the rules. It needs to be validated such that it will only accept anything other than the default <code>-- Choose User Type --</code> option.</p>
  
  <p><strong>What I Tried:</strong></p>
  
  <p><code>not_in</code> did not work, unfortunately.</p>
  
  <p>Can I get some help on this?</p>
  
  <p>Thanks.</p>