I am taking a laravel course an in order to follow the course I have to fix this issue, I checked everything, and apparently, everything is the same as the guy shows me. But the difference is that his validation works but not mine. It has to redirect me to the register\_form when the validation is invalid but it doesn't.

Route

```
Route::get('/', function(){
    return view('welcome');
});

Route::get('/register', 'HomeController@register_form');

Route::post('/register', 'HomeController@register');

```

Controller 

```
namespace CoolBlog\Http\Controllers;

use Illuminate\Http\Request;

class HomeController extends Controller {

    public function register_form(){
        return view('register');
    }

    public function register(Request $request) {
        $this->validate($request, [
            'username' => 'min:5|max:30',
            'email' => 'email',
            'pass' => 'min:5',
            'pass2' => 'same:pass'
        ]);
    }
}

```

Html Page

```
@extends('layout.default')

@section('title', 'Registration')

@section('content')
    <form method="post" action="/register" >
        {{csrf_field()}}
        Name: <input type="text" name="username"><br>
        E-mail: <input type="text" name="email"><br>
        Password: <input type="password" name="pass2"><br>
        Re-Password: <input type="password" name="pass2"><br>
        <input type="submit" value="Register">
    </form>

@endsection

```