title: Laravel validation testing using data provider
body: <p>I have laravel rules validation and i want test it all give rules with one method and dataProvider using phpunit</p>
  
  <p>For example i have rules <code>required|string|max:255</code> i want test <code>required</code> <code>string and</code>max:255` rules without writing test method separately</p>
  
  <p>But i only can do it for <code>required</code> rules only i want test the second rules like <code>digit_between</code> for identity field but <code>first_name</code> field doesnt have <code>digit_between</code> but is <code>string</code></p>
  
  <ol>
  <li>here my example rules code</li>
  </ol>
  
  <pre><code>    {
       return [
        'identity_number' =&gt; 'required|digits_between:1,255|unique:borrowers',
        'first_name'      =&gt; 'required|string|max:255',
        'last_name'       =&gt; 'required|string|max:255',
        'birthdate'       =&gt; 'required|date',
       ];
      }
  </code></pre>
  
  <p>2.testing code :</p>
  
  <pre><code>    /**
       * Test store validation.
       *
       * @return void
       *
       * @group user
       * @dataProvider requiredStoreValidationProvider
       */
      public function testStoreValidation($formInput, $formInputValue)
      {
          $response = $this-&gt;actingAs($this-&gt;user)
              -&gt;post(route('borrower.store'), [
                  $formInput =&gt; $formInputValue,
              ]);
  
          $response-&gt;assertSessionHasErrorsIn('validation', $formInput);
      }
  
      /**
       * Required store data validation provider.
       *
       * @return \string[][]
       */
      public function requiredStoreValidationProvider()
      {
          return [
              ['identity_number', ''],
              ['first_name', ''],
              ['last_name', ''],
              ['birthdate', ''],
          ];
      }
  </code></pre>