title: Laravel Validator Not Working Properly - Redirecting main page
body: <p>Laravel 5.5</p>
  <pre><code>public function register(Request $request) {
      request()-&gt;validate([
          'email' =&gt; 'required:email'
          'password' =&gt; 'required|min:6'
      ]);
  
      return response()-&gt;json([&quot;message&quot; =&gt; &quot;Hello World&quot;]); 
  }
  </code></pre>
  <p>If validator is fails, not giving error messages. Redirecting main page.</p>