darkotodoric/password-strength-validator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

darkotodoric/password-strength-validator

最新稳定版本:v1.0.1

Composer 安装命令:

composer require darkotodoric/password-strength-validator

包简介

A lightweight PHP library for checking password strength

README 文档

README

Packagist License Packagist Version

A lightweight PHP library for checking password strength

Installation

Install the latest version with:

$ composer require darkotodoric/password-strength-validator

Usage

<?php

require_once 'vendor/autoload.php';

$password = 'darkoTODORIC123@';
$passwordStrengthValidator = new PasswordStrengthValidator($password);

if($passwordStrengthValidator->isValid()){
    // message here
}

Parameters

The class constructor for PasswordStrengthValidator accepts the following parameters:

  • password (string, required): The password string to be evaluated for strength.
  • minLength (int, optional, default: 6): Specifies the minimum required length for the password.
  • requireSpecialChar (bool, optional, default: true): Indicates whether the password must contain at least one special character.
  • requireNumber (bool, optional, default: true): Specifies whether the password must contain at least one numeric digit.
  • requireUpperCase (bool, optional, default: true): Determines whether the password must include at least one uppercase letter.
  • requireLowerCase (bool, optional, default: true): Specifies whether the password must include at least one lowercase letter.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve this project.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-09