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:
parent
9d69f47ade
commit
e65dc5708d
4 changed files with 17 additions and 1 deletions
|
@ -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'
|
||||
]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue