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
|
@ -76,6 +76,13 @@ class User extends Model implements AuthenticatableContract,
|
|||
*/
|
||||
protected $hidden = ['password', 'remember_token', 'totp_secret'];
|
||||
|
||||
/**
|
||||
* The rules for user passwords
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PASSWORD_RULES = 'min:8|regex:((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})';
|
||||
|
||||
public function permissions()
|
||||
{
|
||||
return $this->hasMany(Permission::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue