Search
 
SCRIPT & CODE EXAMPLE
 

PHP

password strength php

public function checkPassword($pwd, &$errors) {
    $errors_init = $errors;

    if (strlen($pwd) < 8) {
        $errors[] = "Password too short!";
    }

    if (!preg_match("#[0-9]+#", $pwd)) {
        $errors[] = "Password must include at least one number!";
    }

    if (!preg_match("#[a-zA-Z]+#", $pwd)) {
        $errors[] = "Password must include at least one letter!";
    }     

    return ($errors == $errors_init);
}
Comment

PREVIOUS NEXT
Code Example
Php :: undefined method JeroenNotenLaravelAdminLteHelpersMenuItemHelper::isSearchBar() 
Php :: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65015808 bytes) 
Php :: remove action from theme wordpress 
Php :: server error in laravel 
Php :: php set global variables from function 
Php :: get table name from model laravel 
Php :: how refresh object in database in laravel 
Php :: how send parameter with command in laravel 
Php :: strpos in php 
Php :: Creating a new laravelproject 
Php :: how to use javascript variable in php 
Php :: php file for image load 
Php :: wordpress show notice 
Php :: wp get author description 
Php :: mysqli real escape string php 
Php :: laravel @canany 
Php :: wordpress check if class exists 
Php :: db::statement in laravel 
Php :: parametre grouping laravel quert 
Php :: append file in php 
Php :: laravel withHas 
Php :: upload pdf file in laravel 
Php :: how to get a particular column in laravel 8 
Php :: how to use md5 in php 
Php :: laravel difference between fill and update 
Php :: phpspreadsheet middle align 
Php :: laravel 8 insert multiple rows 
Php :: lat long in laravel validation 
Php :: php replace blackslash 
Php :: change php version in linux 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =