I'm trying to require passwords with at least one number and one letter, between 6 and 10 characters long.
However, I think my code is requiring at least one lowercase and one uppercase letter - which I don't want to do.
How would I change this?
if (! preg_match("/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{6,10}$/", trim($_POST['password'])) {
$errors[] = "Your password must be 6-10 characters in length and contain both letters and numbers.\n";
}