I'm capturing username, email and password in a custom registration form on my WordPress site. I'm sanitising the username using sanitize_user()
and sanitize_email()
sanitises the email address.
For example:
$username = sanitize_user( $username );
$email = sanitize_email( $email );
How should I sanitise the password entered by the user? All I can think of is sanitize_text_field( $pass )
but I'm sure that isn't the right way to do it.
Ref: