mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-23 08:43:46 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user