title: Laravel - same custom error message for multiple fields
body: <p>Im using a form request for validation and want to customize my errors. since I have a lot of fields to validate,I want to know if it is possible to use the same error message for multiple fields that have the same validation rule.</p>
  
  <p>My actual form request looks like : </p>
  
  <pre><code>class CreateServerRequest extends Request
  {
       public function authorize()
  {
      return true;
  }
  public function rules()
  {
      return [
          'srv_prefix' =&gt; 'required|regex:/^[A-Z][-_A-Z0-9]*$/',
          //20 more to go...
  
      ];
  }
  
  public function messages()
  {
      return [
          'srv_prefix.required' =&gt; 'required.',
          'srv_prefix.regex' =&gt; 'nope, bad format.'
      ];
  }
  }
  </code></pre>
  
  <p>I dont like the idea of adding as many lines of errors as fields (some fields may have 2 validation rules..) is there any way to tell laravel <code>if validation rule = required then show this type of error</code> regardless of the field ?</p>