Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php password validation regex

$uppercase = preg_match('@[A-Z]@', $password);
$lowercase = preg_match('@[a-z]@', $password);
$number    = preg_match('@[0-9]@', $password);

if(!$uppercase || !$lowercase || !$number || strlen($password) < 8) {
  // tell the user something went wrong
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #password #validation #regex
ADD COMMENT
Topic
Name
9+7 =