title: Laravel couldn't validate my correct form
body: <p>in <code>Laravel</code> and my web application i have a simple form which i pasted below line:</p>
  <pre><code>&lt;form class=&quot;form-horizontal&quot; action=&quot;{{url('/addToContactUs')}}&quot; method=&quot;POST&quot;&gt;
      @csrf
  
      &lt;div class=&quot;form-group required&quot;&gt;
          &lt;label class=&quot;col-md-2 col-sm-3 control-label&quot; for=&quot;name&quot;&gt;Your Name&lt;/label&gt;
          &lt;div class=&quot;col-md-10 col-sm-9&quot;&gt;
              &lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;{{old('name')}}&quot; class=&quot;form-control&quot;/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group required&quot;&gt;
          &lt;label class=&quot;col-md-2 col-sm-3 control-label&quot; for=&quot;email&quot;&gt;Your Email&lt;/label&gt;
          &lt;div class=&quot;col-md-10 col-sm-9&quot;&gt;
              &lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;{{old('email')}}&quot; class=&quot;form-control&quot;/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group required&quot;&gt;
          &lt;label class=&quot;col-md-2 col-sm-3 control-label&quot; for=&quot;enquiry&quot;&gt;Your Enquiry&lt;/label&gt;
          &lt;div class=&quot;col-md-10 col-sm-9&quot;&gt;
              &lt;textarea name=&quot;enquiry&quot; rows=&quot;10&quot; class=&quot;form-control&quot;&gt;{{old('enquiry')}}&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;buttons&quot;&gt;
          &lt;div class=&quot;pull-left&quot;&gt;
              &lt;input class=&quot;btn btn-primary&quot; type=&quot;submit&quot; value=&quot;SUBMIT&quot;/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <p>when i try to validate form fields, i get this error:</p>
  <pre><code>array:3 [▼
    1 =&gt; array:1 [▼
      0 =&gt; &quot;The 1 field is required.&quot;
    ]
    3 =&gt; array:1 [▼
      0 =&gt; &quot;The 3 field is required.&quot;
    ]
    5 =&gt; array:1 [▼
      0 =&gt; &quot;The 5 field is required.&quot;
    ]
  ]
  </code></pre>
  <p>and when i try to log <code>$request</code> i have:</p>
  <pre><code>array:4 [▼
    &quot;_token&quot; =&gt; &quot;W8xPG039mlT0WGs0kw9lWV0FivYxKSx4XHg6LPkQ&quot;
    &quot;name&quot; =&gt; &quot;this is my name&quot;
    &quot;email&quot; =&gt; &quot;hello@gmail.com&quot;
    &quot;enquiry&quot; =&gt; &quot;hello hello hello hello hello hello &quot;
  ]
  </code></pre>
  <p>it seems all implementations are correct and i don't know why i get this error.</p>
  <p>route for submitting this form:</p>
  <pre><code>Route::post('/addToContactUs', 'HomeController@addToContactUs');
  </code></pre>
  <p>and controller <code>action</code>:</p>
  <pre><code>public function addToContactUs(Request $request)
  {
      $validator = Validator::make(
          $request-&gt;all(),
          [
              'name', 'required|string|min:5|max:191',
              'email', 'required|string|min:5|max:191|email',
              'enquiry', 'required|string|min:5',
          ]
      );
      if ($validator-&gt;fails()) {
          dd($validator-&gt;errors()-&gt;messages(),$request-&gt;all());
      }
  }
  </code></pre>