title: Laravel: Validate a name input in a form
body: <p>I'm using laravel and have a form.How do I validate a name for a input field within a form. so that random numbers cannot be entered in the the field.  It is just a simple input field:</p>
  
  <pre><code>&lt;div class="col-md-6 col-sm-6"&gt;
     &lt;label&gt;First Name: &lt;/label&gt;
  &lt;/div&gt;
  
  &lt;div class="col-md-6 col-sm-6"&gt;
     &lt;input type="text" class ="span3" name="first_name" id="first_name" 
        required/&gt;&lt;br&gt;&lt;br&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have validated an email through an example I saw and it is validates as soon you leave that input box after typing instead of waiting to click the submit button.</p>
  
  <blockquote>
    <p><strong>How would I be able to do that? Meaning, as soon as the user leaves the input field after typing in something(a number), it validates and
    says something(like 'please enter a proper name').</strong> I'm not sure if
    its requires using the regex or not, and how would I be able to get my desired result.</p>
  </blockquote>
  
  <p>My code for the email is as:</p>
  
  <pre><code>&lt;div class="row"&gt;
     &lt;div class="form-group{{ $errors-&gt;has('email') ? ' has-error' : '' }}"&gt;
          &lt;div class="col-md-6 col-sm-6"&gt;
              &lt;label&gt;Email: &lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6 col-sm-6"&gt;
          &lt;input type="email" class ="span3" id="email" name="email" value="{{ 
                old('email') }}" required/&gt;&lt;br&gt;&lt;br&gt;
           @if ($errors-&gt;has('email'))
             &lt;span class="help-block"&gt;
               &lt;strong&gt;{{ $errors-&gt;first('email') }}&lt;/strong&gt;
             &lt;/span&gt;
          @endif
     &lt;/div&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>I was able to do this from an example and this validates the email as soon as a user types.</p>