There isn’t currently a built in method for this. However you can write your own field validation and hook it to the wpmem_pre_register_data action.
http://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_pre_register_data
Thanks Chad, I’ll have a look into how to do this.
Hi Chad,
I think I have something (fairly basic) working now as below –
add_action( 'wpmem_pre_register_data', 'my_reg_hook' );
function my_reg_hook( $fields )
{
$pwd = $fields['password'];
$pwd2 = $fields['confirm_password'];
if (!preg_match('#[a-zA-Z]+#', $pwd)) {
$error = 'Password must include at least one letter!';
}
if (!preg_match('#[0-9]+#', $pwd)) {
$error = 'Password must include at least one number!';
}
if (strlen($pwd) < 8) {
$error = 'Password too short! Must be at least 8 characters.';
}
if ($pwd2 !== $pwd) {
$error = 'Passwords do not match!';
}
global $wpmem_themsg;
$wpmem_themsg = $error;
}