New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

langleyfoxall/laravel-nist-password-rules

🔒 Provides Laravel validation rules that follow the password related recommendations found in NIST Special Publication 800-63B.
606,879 210

Larablocks Analysis

langleyfoxall/laravel-nist-password-rules works with Laravel 5 to 13 (latest release v8.2.0, Jun 8, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 3 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Jun 8, 2026)
  • 5,323 downloads a month (needs 10,000)
  • 210 GitHub stars (at least 100)

State

Maintained
  • Last stable release: Jun 8, 2026.
  • 1 release in the last 12 months.
  • First released: Oct 31, 2018.
  • Monthly downloads: 5,323, down 26% from six months ago.
  • 14 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 25, 2026.

Install
composer require langleyfoxall/laravel-nist-password-rules
Latest Version:v8.2.0
PHP:>=7.2
Laravel:5 – 13
License:LGPL-3.0-only
Last Updated:Jun 8, 2026
Links: GitHub  ·  Packagist
Maintainer: Jord-JD

🔒 Laravel NIST Password Rules

Build Status Coverage Status StyleCI Packagist

This package provides Laravel validation rules that follow the password related recommendations found in NIST Special Publication 800-63B section 5.

Laravel NIST Password Rules implements the following recommendations.

Recommendation Implementation
[...] at least 8 characters in length A standard validation rule in all rule sets to validate against this minimum length of 8 characters.
Passwords obtained from previous breach corpuses The BreachedPasswords rule securely checks the password against previous 3rd party data breaches, using the Have I Been Pwned - Pwned Passwords API.
Dictionary words The DictionaryWords rule checks the password against a list of over 102k dictionary words.
Context-specific words, such as the name of the service, the username The ContextSpecificWords rule checks the password does not contain the provided username, and any words defined the configured app name or app URL.
Context-specific words, [...] and derivatives thereof The DerivativesOfContextSpecificWords rule checks the password is not too similar to the provided username, and any words defined the configured app name or app URL.
Repetitive or sequential characters (e.g. ‘aaaaaa’, ‘1234abcd’) The RepetitiveCharacters and SequentialCharacters rules checks if the password consists of only repetitive or sequential characters.

It also provides methods to return validation rules arrays for various scenarios, such as register, login, and password changes. These arrays can be passed directly into the Laravel validator.

Installation

Laravel NIST Password Rules can be easily installed using Composer. Just run the following command from the root of your project.

composer require langleyfoxall/laravel-nist-password-rules

If you have never used the Composer dependency manager before, head to the Composer website for more information on how to get started.

Optionally, you may publish the package's translation files with the following Artisan command.

php artisan vendor:publish --provider="LangleyFoxall\LaravelNISTPasswordRules\ServiceProvider"

Usage

To use the Laravel NIST Password Rules in your project, first use the PasswordRules class, then call the appropriate static methods to return an array of appropriate validation rules. There are methods available for the following scenerios.

  • Register
  • Change password, with old password
  • Change password, without old password
  • Optionally change password, with old password
  • Optionally change password, without old password
  • Login

See the code below for example usage syntax.

use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;

// Register
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::register($request->email),
]);

// Register, without requiring password confirmation
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::register($request->email, false),
]);

// Change password, with old password
$this->validate($request, [
    'old_password' => 'required',
    'password' => PasswordRules::changePassword($request->email, 'old_password'),
]);

// Change password, without old password
$this->validate($request, [
    'password' => PasswordRules::changePassword($request->email),
]);

// Optionally change password, with old password
$this->validate($request, [
    'old_password' => 'required',
    'password' => PasswordRules::optionallyChangePassword($request->email, 'old_password'),
]);

// Optionally change password, without old password
$this->validate($request, [
    'password' => PasswordRules::optionallyChangePassword($request->email),
]);

// Login
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::login(),
]);

The optionallyChangePassword method supplies validation rules that are appropriate for forms in which the password can be optionally changed if filled in.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
v8.2.0 >=7.2 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 LGPL-3.0-only
v8.1.0 >=7.2 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0 LGPL-3.0-only
v8.0.0 >=7.2 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0 LGPL-3.0-only
v7.0.0 >=7.2 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0 LGPL-3.0-only
v6.5.0 >=7.2 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0 LGPL-3.0-only