Download the PHP package arxeiss/passwordrule without Composer

On this page you can find all versions of the php package arxeiss/passwordrule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package passwordrule

Password validation from Laravel 8.39+

Deprecation: This tool is deprecated, since Password validation was added into Laravel core in version 8.39. Read more in Laravel News and in Laravel documentation

Password Rule for Laravel 5.5+

Package contains PasswordRule class for validation password fields with Laravel validator. Nowadays passwords containing numbers, lower and upper case characters (and symbols) are not enough. But it is still better than simple minimum length rule.

Custom Rule created with Illuminate\Contracts\Validation\Rule interface was introduced in Laravel 5.5. But you can simply copy logic and use in earlier Laravel version too.

IMPORTANT NOTE - Don't miss Add to predefined Laravel Auth controllers section, as in original Controllers must be rules changed as well.

Table of contents

Installation

Installing via composer is suggested:

No more steps are needed, as Laravel 5.5+ provides automatic package discovery.

Configuration

By default, package contains English and Czech translations and default config is shown below. Do not change config file or translations in vendor folder. Run command

to publish config file config/passwordrule.php and translation files into resources/lang/vendor/passwordrule/.

What PasswordRule can do

PasswordRule can be used in Laravel to validate password input with four optional rules.

All settings can be set via global config file as well as in constructor for each instance.

Message format

PasswordRule returns always single message, which is built according to settings. There is basic phrase, which is used always. According to settings above are then added more or less phrases. In language file are specified two join phrases. join_comma is used to join all phrases except the last one. Before the last one is inserted join_and.

Result message can looks like this:

Usage

Basic usage

Form Request validation:

Request validation:

Overriding global settings

PasswordRule constructor accepts 4 parameters, which can override global settings new PasswordRule($minLength, $camelCase, $numbers, $specialChars). Pass null to load specific setting from global config.

Add to predefined Laravel Auth controllers

Laravel in his starter package laravel/laravel provides basic Auth controllers. Important now are RegisterController and ResetPasswordController, because in both controllers are original password rules.

In RegisterController are rules directly written, it is easy to change. But in ResetPasswordController must be overridden method rules() as shown in code below.

Changelog

[1.0] - 14.8.2018


All versions of passwordrule with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0 || ^8.0
illuminate/support Version ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/contracts Version ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arxeiss/passwordrule contains the following files

Loading the files please wait ....