title: Laravel custom validation messages not working
body: <p>I am using repository pattern using <a href="https://github.com/andersao/l5-repository#validators" rel="nofollow">L5-repository validation</a>. This is my </p>
  
  <h2>controller</h2>
  
  <pre><code>&lt;?php
  
  namespace App\Api\V1\Controllers;
  
  use Request;
  use Dingo;
  use App\Http\Controllers\Controller;
  use App\Repositories\UserRepository;
  use App\Api\V1\Transformers\BankAccountTransformer;
  use Prettus\Validator\Exceptions\ValidatorException;
  use \Prettus\Validator\Contracts\ValidatorInterface;
  use App\Api\V1\Validations\BankAccountValidator;
  
     public function store()
      {
          $request = Request::all();
          try {
                  //Validate request body
                  $this-&gt;validator-&gt;with(  $request )-&gt;passesOrFail(ValidatorInterface::RULE_CREATE);
  
          }  catch (ValidatorException $e) {
                  throw new Dingo\Api\Exception\StoreResourceFailedException('Unable to add bank account', $e-&gt;getMessageBag()); 
    //  Wiki of the project says to use getMessage(), but it throws error
  
          }
      }
  </code></pre>
  
  <h2>Validation class</h2>
  
  <pre><code>&lt;?php
  
      namespace App\Api\V1\Validations;
  
      use \Prettus\Validator\Contracts\ValidatorInterface;
      use \Prettus\Validator\LaravelValidator;
  
      class BankAccountValidator extends LaravelValidator {
  
          protected $rules = [
              ValidatorInterface::RULE_CREATE =&gt; [
              'bank_name' =&gt; 'required'
              ],
              ValidatorInterface::RULE_UPDATE =&gt; [
              ]
          ];
  
          protected $messages = [
              'bank_name.required' =&gt; 'My custom error'
          ];
  
      }
  </code></pre>
  
  <p>But I am getting this error  when I use <strong>$e->getMessage()</strong> .</p>
  
  <pre><code>  "message": "Call to a member function isEmpty() on string"
  </code></pre>
  
  <p>If I am using <strong>$e->getMessageBag()</strong>  I am getting proper error response. But my custom messages are not displayed. A generic message is displayed.</p>
  
  <pre><code>"errors": {
      "bank_name": [
        "The bank name field is required."
      ]
    }
  </code></pre>
  
  <p>It actually should have been</p>
  
  <pre><code>"errors": {
      "bank_name": [
        "My customer error"
      ]
    }
  </code></pre>
  
  <p>dd($e)</p>
  
  <pre><code>ValidatorException {#505
    #messageBag: MessageBag {#507
      #messages: array:1 [
        "bank_name" =&gt; array:1 [
          0 =&gt; "The bank name field is required."
        ]
      ]
      #format: ":message"
    }
    #message: ""
    #code: 0
    #file: "/home/vagrant/dev-develop/vendor/prettus/laravel-validation/src/Prettus/Validator/AbstractValidator.php"
    #line: 109
    -trace: array:58 [
      0 =&gt; array:3 [
        "call" =&gt; "Prettus\Validator\AbstractValidator-&gt;passesOrFail()"
        "file" =&gt; "/home/vagrant/dev-develop/app/Api/V1/Controllers/BankAccountController.php:61"
        "args" =&gt; array:1 [
          0 =&gt; "create"
        ]
      ]
  </code></pre>