PHP code example of mdarse / password-strength-validator

1. Go to this page and download the library: Download mdarse/password-strength-validator 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/ */

    

mdarse / password-strength-validator example snippets


use Darse\PasswordStrengthValidator\Constraint\PasswordStrength;

class User
{
    /**
     * @PasswordStrength(min_score=3, message="Custom message for weak password error")
     */
    private $password;
}