Skip to content

acodeninja/laravel-pwned-passwords-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel PwnedPassword Validation

Develop Build Status Develop Master Build Status Master Total Downloads Latest Stable Version Latest Unstable Version License

Validate that a given string is not present in the pwned passwords list at https://haveibeenpwned.com/Passwords

Installation

Install using composer from packagist

composer require acodeninja/laravel-pwned-passwords-validator

Usage

Use as you would any other validation rule

In a request

/**
 * Get the validation rules that apply to the request.
 *
 * @return array
 */
public function rules()
{
    return [
        'email' => 'required|email|unique:users,email',
        'password' => 'required|pwned_password_strict',
    ];
}

In a controller

$validator = Validator::make($request->all(), [
    'email' => 'required|email|unique:users,email',
    'password' => 'required|pwned_password_strict',
])->validate();

About

Validate that a given string is not present in the pwned passwords list at https://haveibeenpwned.com/Passwords

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages