PHP code example of arxeiss / passwordrule

1. Go to this page and download the library: Download arxeiss/passwordrule library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arxeiss / passwordrule example snippets


/**
 * Get the validation rules that apply to the request.
 *
 * @return array
 */
public function rules()
{
    return [
        'password' => ['

public function store(Request $request)
{
    $request->validate([
        'password' => ['

return [
    // Password must be at least 8 characters long and must contains "_"
    'password' => ['

/**
 * Get the password reset validation rules.
 *
 * @return array
 */
protected function rules()
{
    $rules = parent::rules();
    $rules['password'] = ["
bash
php artisan vendor:publish --provider="PasswordRule\PasswordRuleServiceProvider"