title: Laravel Form validation redirects back to home page upon form errors instead of staying on same page
body: <p>I have a contact form that when submitted, is successfully going to the DB. The issue is, when I check for validation on my webpage, the errors appear properly using Larvael $error validation, the problem is that my webpage always redirects back to home when errors show up instead of the page remaining still and showing the errors. I have to keep scrolling down to where my contact form is to see the errors; this will be annoying for my future users. How do I get the page to remain where it is if there are errors? NOTE: My page redirects correctly when the form is valid and submitted, this is not an issue. NOTE-2: I have created a single page webpage that the nav-links take you to, there are no redirects. Instead, it is one HTML page. </p>
  
  <p><strong>Web.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>Route::get('/', 'HomeController@index')-&gt;name('home');
  Route::post('/contact/submit', 'MessagesController@submit');
  </code></pre>
  
  <p><strong>MessagesController.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>namespace App\Http\Controllers;
  
  use App\Message;
  use Illuminate\Http\Request;
  
  class MessagesController extends Controller
  {
      public function submit(Request $request)
      {
          $validatedData = $request-&gt;validate([
              'name' =&gt; 'required|min:2',
              'email' =&gt; 'required|max:255',
              'phonenumber' =&gt; 'required|min:10|max:10',
              'message' =&gt; 'required|min:5',
          ]);
  
          Message::create($validatedData);
  
          return redirect('/')-&gt;with('success', 'Your message has been 
              successfully sent. We will reach out to you soon');
      }
  }
  </code></pre>
  
  <p><strong>contact.blade.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>{{--CONTACT FORM--}}
  &lt;section id="contact"&gt;
      &lt;div class="container-fluid padding"&gt;
          &lt;div class="row text-center padding"&gt;
              &lt;div class="col-12"&gt;
                  &lt;h2 class="lead display-3"&gt;Contact Us&lt;/h2&gt;
                  &lt;hr class="my-4"&gt;
  
                  &lt;form action="/contact/submit" method="POST"&gt;
                      @csrf
                      &lt;div class="field"&gt;
                          &lt;label for="name" class="label"&gt;Name&lt;/label&gt;
  
                          &lt;div class="control"&gt;
                              &lt;input type="text" class="input {{$errors-&gt;has('name') ? 'is-danger' : 'is-success'}}"
                                     name="name" placeholder="Project Title" value="{{old('name')}}"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="field"&gt;
                          &lt;label for="name" class="label"&gt;Email&lt;/label&gt;
  
                          &lt;div class="control"&gt;
                              &lt;input type="text" class="input {{$errors-&gt;has('email') ? 'is-danger' : 'is-success'}}"
                                     name="email" placeholder="Project Title" value="{{old('email')}}"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="field"&gt;
                          &lt;label for="name" class="label"&gt;Phone Number&lt;/label&gt;
  
                          &lt;div class="control"&gt;
                              &lt;input type="text"
                                     class="input {{$errors-&gt;has('phonenumber') ? 'is-danger' : 'is-success'}}"
                                     name="phonenumber" placeholder="Project Title" value="{{old('phonenumber')}}"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="field"&gt;
                          &lt;label for="message" class="label"&gt;Message&lt;/label&gt;
                          &lt;div class="control"&gt;
                              &lt;textarea name="message"
                                        class="textarea {{$errors-&gt;has('message') ? 'is-danger' : 'is-success'}}"
                                        placeholder="Project description"&gt;{{old('message')}}&lt;/textarea&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="field"&gt;
                          &lt;div class="control"&gt;
                              &lt;button type="submit" class="button is-link"&gt;Create Project&lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;!--Errors variable used from form validation --&gt;
                      @if($errors-&gt;any())
                          &lt;div class="notification is-danger"&gt;
                              &lt;ul&gt;
                                  @foreach($errors-&gt;all() as $error)
                                      &lt;li&gt;{{$error}}&lt;/li&gt;
                                  @endforeach
                              &lt;/ul&gt;
                          &lt;/div&gt;
                      @endif
                  &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>