Add password_confirmation field to register page
MODIFY
app/Http/Controllers/RegisterController.php
app/Http/Controllers/RegisterController.php
@@ -17,10 +17,10 @@ class RegisterController extends Controller {
}
public function store(Request $request) {
- $this->validate($request, [
+ $request->validate([
'name' => 'required',
'email' => 'required|email',
- 'password' => 'required',
+ 'password' => 'required|confirmed',
'currency' => 'required'
]);

MODIFY
resources/views/register.blade.php
resources/views/register.blade.php
<label>Password</label>
<input type="password" name="password" />
@include('partials.validation_error', ['payload' => 'password'])
+ <label>Verify Password</label>
+ <input type="password" name="password_confirmation" />
+ @include('partials.validation_error', ['payload' => 'password'])
<label>Currency</label>
<select name="currency">
@foreach ($currencies as $currency)

Add password_confirmation field to register page