title: Laravel validate model
body: <p>I've created an <code>Employer</code> model in my Laravel 4 application and, in <code>Employer.php</code> I have created the following function to validate user input before saving it to the database:</p>
  
  <pre><code>public static function validate($input)
  {
      $validator = Validator::make($input, static::$rules);
  
      if ($validator-&gt;fails() {
          return $validator;
      }
  
      return true;
  }
  </code></pre>
  
  <p>This works fine when I'm creating a new record in the database, because I am passing in values for all the rules where I have specified a particular field is required.</p>
  
  <p>However, there are certain fields in the database I don't want the user to edit after they have been created (for example, <code>business_name</code>). On the controller's edit method I create a form and omit those fields from the form. But validation fails because <code>business_name</code> is required by the <code>$rules</code>.</p>
  
  <p>As a temporary work around, I tried just creating a hidden field in the edit form and populating it with the <code>business_name</code>. However, this is also required to be unique and fails when I PATCH my form to the <code>update</code> method!</p>
  
  <p>Any advice? Is there any way I can specify which validation rules should be applied depending on the method calling it? Or should I create a new method in <code>Employer.php</code> specifically to validate on the update method?</p>