PHP code example of devlop / secure-password-rule

1. Go to this page and download the library: Download devlop/secure-password-rule 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/ */

    

devlop / secure-password-rule example snippets


namespace App\Http\Requests;

use Devlop\SecurePasswordRule\SecurePasswordRule;
use Illuminate\Foundation\Http\FormRequest;

class ChangePasswordRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'new_password' => [
                '

namespace App\Rules;

use Devlop\SecurePasswordRule\SecurePasswordRule as BaseSecurePasswordRule;

class SecurePasswordRule extends BaseSecurePasswordRule
{
    /**
     * Require the use of X special characters
     */
    protected int $