Title: Password length / strength
Last modified: November 7, 2017

---

# Password length / strength

 *  [AbbaTheHorse](https://wordpress.org/support/users/mattalexander/)
 * (@mattalexander)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/password-length-strength/)
 * Is it possible to enforce a minimum password length and/or strength criteria?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/password-length-strength/#post-9660550)
 * Yes and no.
 * The plugin does not have a setting for this. However, it is customizable with
   action and filter hooks in most processes.
 * There is a premium extension available that has a number of password settings
   including requiring strong passwords (uses the WP password strength meter in 
   the form). See: [https://rocketgeek.com/plugins/wp-members/extensions/security-extension/](https://rocketgeek.com/plugins/wp-members/extensions/security-extension/)
 *  Thread Starter [AbbaTheHorse](https://wordpress.org/support/users/mattalexander/)
 * (@mattalexander)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/password-length-strength/#post-9775442)
 * Hi Chad
 * Thank you, I’ve got that all up and running!
 * However, I was wondering if there is a way to:
 * 1) Disable the “Update Password” button until the strong password criteria has
   been met
 * And/or
 * 2) Display an error message back to the user if they try to enter a weak/medium
   password?
 * Users are currently getting a bit confused as it looks as though they can update
   their password as the button is active, but when they click it, nothing happens
   to tell them they’ve not set a strong enough password.
 * Any advice would be much appreciated.
 * Many thanks,
 * Matt
 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/password-length-strength/#post-9785989)
 * Possible? Yes. Explained simply? Unfortunately, no.
 * The broad answer is that yes you can do this by applying some JavaScript (ideally
   jQuery). You could implement WP’s meter (which also disables the button until
   the meter meets the criteria).
 * There are some articles out there on how to use WP’s password meter in your own
   form, and the information can be adapted to this case by filtering it in.
 * That’s essentially what I did when I built it into the [Security extension](https://rocketgeek.com/plugins/wp-members/extensions/security-extension/).
 * I used [wp_enqueue_script](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
   to load my custom javascript and css (which I built from tutorials found on the
   web about how to integrate the WP password meter). I used [wpmem_login_form_rows](https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_login_form_rows/)
   and [wpmem_register_form_rows](https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_register_form_rows/)
   to add a new row to contain the HTML required for the meter. And I used wpmem_register_form_buttons
   to filter the button HTML to add the “disabled” class needed for the submit button(
   that required an str_replace() but could also be done replacing the entire HTML
   string).
 *  Thread Starter [AbbaTheHorse](https://wordpress.org/support/users/mattalexander/)
 * (@mattalexander)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/password-length-strength/#post-9785997)
 * Thanks Chad, that’s superb.
 * I’ll give that a look and see how I get on.
 * Many thanks again,
 * Matt

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Password length / strength’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [AbbaTheHorse](https://wordpress.org/support/users/mattalexander/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/password-length-strength/#post-9785997)
 * Status: not resolved