PHP 정규식 비밀번호 유효성 검사
·
Programing/PHP
2025.04.22 - [Programing/PHP] - php 비밀번호 유효성 검사 으로 개선되었습니다. function passwordCheck($_str){ $pw = $_str; $num = preg_match('/[0-9]/u', $pw); $eng = preg_match('/[a-z]/u', $pw); $spe = preg_match("/[\!\@\#\$\%\^\&\*]/u",$pw); if(strlen($pw) 30) { return array(false,"비밀번호는 영문, 숫자, 특수문자를 혼합하여 최소 10자리 ~ 최대 30자리 이내로 입력해주세요."); exit; } if(preg_match("/\s/u", $pw) ..