Skip to content

emiliopedrollo/laravel-secure-passwords

Repository files navigation

Laravel Secure Passwords

Build Status Latest Stable Version Total Downloads License Code Climate maintainability

This package provides useful ways to ensure strong passwords via validation in Laravel 6 applications.

The provided new validations:

  • alphabetic characters
  • numeric characters
  • mixed case characters
  • symbols
  • common used passwords (provided by SplashData)

Documentation

Installation

Get the package

composer require emiliopedrollo/laravel-secure-passwords:"~0.2".

Usage

Now Laravel's native Validator is extended by those rules:

  • has_uppercase
  • has_lowercase
  • has_both_cases
  • has_digit
  • has_letter
  • has_symbol
  • not_a_common_password

Example

You can apply these rules as described in the validation section on Laravel's website

Validator::make(['password' => 'trustno1']
    'password' => 'has_digit|has_letter|not_a_common_password'
)->passes();   // returns false;

History

[Laravel 5]

[0.1]

  • Initial release

License

This package is under the MIT license. See the complete license:

Reporting Issues or Feature Requests

Issues and feature requests are tracked on GitHub.