Validate password on reset according to rules (#158)

* move password rules to Models\User::PASSWORD_RULES

* validate new password according to rules on password reset

* add password requirements info to auth.passwords.reset view
This commit is contained in:
Jakob 2016-10-30 21:02:39 +01:00 committed by Dane Everitt
parent 9d69f47ade
commit e65dc5708d
4 changed files with 17 additions and 1 deletions

View file

@ -84,7 +84,7 @@ class AccountController extends Controller
$this->validate($request, [
'current_password' => 'required',
'new_password' => 'required|confirmed|different:current_password|regex:((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})',
'new_password' => 'required|confirmed|different:current_password|' . Models\User::PASSWORD_RULES,
'new_password_confirmation' => 'required'
]);