ตัวอย่าง
And End ->
of the string there has to be at least one number ->
and at least one letter ->
and it has to be a number, a letter or one of the following: !@#$% ->
and there have to be 8-12 characters ->
เพิ่มเติม คลิก
if(!preg_match('/^(?=.*\d)(?=.*[A-Za-z])[0-9A-Za-z!@#$%]{8,12}$/', $password)) {
echo 'the password does not meet the requirements!';
}
Between Start -> ^
And End ->
$
of the string there has to be at least one number ->
(?=.*\d)
and at least one letter ->
(?=.*[A-Za-z])
and it has to be a number, a letter or one of the following: !@#$% ->
[0-9A-Za-z!@#$%]
and there have to be 8-12 characters ->
{8,12}
เพิ่มเติม คลิก
ไม่มีความคิดเห็น:
แสดงความคิดเห็น