# How to verify a password input

**URL:** <https://forum.bubble.io/t/how-to-verify-a-password-input/76194>\
**Category:** Tips\
**Created:** [January 14, 2020, 8:44am UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194 "2020-01-14T08:44:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [January 14, 2020, 8:44am UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/1 "2020-01-14T08:44:17Z")

</div>

I wanted to share what I put together for verifying a password. I spent some time looking through blog posts about proper user experience design for forms

> **[18 UX Design Tips for Registration and Login Forms](https://uxplanet.org/18-ux-design-tips-for-registration-and-login-forms-f897557358ba)**
>
> Following are some of the tips that could help an Interaction Designer create better registration and login forms.

And took that suggestion numbers 14,15,16 and 17 would help users greatly when signing up and creating a password according to the settings I’ve placed on my app.

 ![Screen Shot 2020-01-14 at 3.25.34 PM](https://us1.discourse-cdn.com/bubble/original/3X/0/d/0d1179b1510d11a34898fc2f4e8fe492e745108c.png)

This is what I came up with:

![password verify](https://us1.discourse-cdn.com/bubble/original/3X/7/9/799f0b3e9c4d4966e7ff8886c6a273f4a5c0eee2.gif)

My intention on this tip is not to provide all steps, but rather the things I found to be a bit more advanced such as displaying that caps lock is on, verifying the use of lowercase, uppercase, special characters, numbers, character count and no spaces. Some other things such as showing the password and how to conditionally format things for colors etc. can be found on the forum, where I over time have learned how to do such things.

To make all of this work there are some plugins that you will need…I am on a low budget, so all are free plugins.

> **[Reveal & Hide Password Plugin for Bubble, by Zeroqode](https://bubble.io/plugin/reveal--hide-password-1531310660066x700901076712292400)**
>
> Reveal & Hide Password Plugin page on Bubble, by Zeroqode. Add Reveal & Hide Password in one click to your app. Bubble lets you build web apps without any code.

> **[theCountable Plugin for Bubble, by Zeroqode](https://bubble.io/plugin/thecountable-1529604179466x437088273613455360)**
>
> theCountable Plugin page on Bubble, by Zeroqode. Add theCountable in one click to your app. Bubble lets you build web apps without any code.

> **[Toolbox Plugin for Bubble, by Misha V](https://bubble.io/plugin/toolbox-1488796042609x768734193128308700)**
>
> Toolbox Plugin page on Bubble, by Misha V. Add Toolbox in one click to your app. Bubble lets you build web apps without any code.

Big thanks to @levon and @mishav for making these available to the community for free and maintaining their functionality, as well as being responsive to questions and supporting users. Both responded to questions on how to use the plugins to help resolve issues I had with implementing them.

Also, thank you to @tim12333 who was very helpful and generous to get my code needed for the caps on to function correctly.

1. To verify the character count I needed to use the “countable plugin”.

 ![Screen Shot 2020-01-14 at 3.36.46 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/2/f24e78afbbe1fd9e5439e1349d579b5cdb993326.png)

You must set your countable element to use the ID of the input to recognize what to count

 ![Screen Shot 2020-01-14 at 3.37.38 PM](https://us1.discourse-cdn.com/bubble/original/3X/e/b/eb34361c7a26926fe862b9d7c256c71636b84a50.png)

 ![Screen Shot 2020-01-14 at 3.38.31 PM](https://us1.discourse-cdn.com/bubble/original/3X/9/2/922c3e75b91a2398f6c69dd9d16d958b3f3eea05.png)

So, whatever the ID Attribute of your input element is, you need to place in the countable element ID at the top of the element editor. I used “1” in my example…make it whatever you’d like it to be.

1. To verify the use of lowercase, uppercase, special characters, numbers and no spaces I had to use “extract with regex”…This is a bit beyond me and I relied heavily on other websites for understanding how to use extract with regex, specifically what expressions to use for each validation.

This website is helpful

> **[Regex tutorial  —  A quick cheatsheet by examples](https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285)**
>
> Regular expressions (regex or regexp) are extremely useful in extracting information from any text by searching a specific search pattern

But also just google searching…something I do regularly to try and solve my own issues and to learn more about programming and app design etc.

For verifying the use of lowercase:

 ![Screen Shot 2020-01-14 at 3.41.02 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/9/f942f9262e22ca98864efb8e3ea65d23bbbeb2a1.png)

For verifying the use of uppercase:

 ![Screen Shot 2020-01-14 at 3.44.52 PM](https://us1.discourse-cdn.com/bubble/original/3X/8/9/895843543f3745aa57480ca64ae41ec30ab6cb81.png)

For verifying the use of a number:

 ![Screen Shot 2020-01-14 at 3.45.18 PM](https://us1.discourse-cdn.com/bubble/original/3X/a/7/a7da0bddb974be7243bc93352fe3c88a3740b197.png)

For verifying the use of special characters:

 ![Screen Shot 2020-01-14 at 3.45.53 PM](https://us1.discourse-cdn.com/bubble/original/3X/4/b/4b387a027082f2bfd395faa33482daa3f9de51a9.png)

For verifying no spaces:

 ![Screen Shot 2020-01-14 at 3.46.20 PM](https://us1.discourse-cdn.com/bubble/original/3X/1/1/118065d2a9f19925cf2c15cf287d6c48a6ac074e.png)

To be able to reveal the password I used the “reveal” plugin linked above…it is simple to use

Just place the element on page, then create a workflow event to trigger the “toggle” of the reveal…you must use the element ID Attribute of the input ( mine is “1” )

![Screen Shot 2020-01-14 at 3.47.31 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/e/fe90013f1c850225cefb74fa31988e7e634ea95b.png)

Then the last portion of showing a caps lock on indicator requires the use of the toolbox plugin.

What you will need to do is add an expression element to the page as well as two JavaScript to Bubble elements

![Screen Shot 2020-01-14 at 3.49.42 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/e/fe17f0e0aaeb1b7f295a2ebfd96d340ddbff1c3b.png)

In the expression element need to have the code:

![Screen Shot 2020-01-14 at 3.50.02 PM](https://us1.discourse-cdn.com/bubble/original/3X/3/8/38f533521a1cba3fb3cc393acdd89ac9e6899799.png)

Also make sure to put a conditional on this element to ensure it works properly…basically make it so this element is not visible until the password input is visible

![Screen Shot 2020-01-14 at 3.51.05 PM](https://us1.discourse-cdn.com/bubble/original/3X/3/5/354ca1d93856723c7af4ad40ed3b4a478701f8ed.png)

Then in the JavaScript to Bubble elements you need the suffix set up

![Screen Shot 2020-01-14 at 3.51.44 PM](https://us1.discourse-cdn.com/bubble/original/3X/a/9/a96b783f71d37ba6be47bdfd120c83bef8e3ade5.png)

> yourTriggerNameForCapsPressed

![Screen Shot 2020-01-14 at 3.52.18 PM](https://us1.discourse-cdn.com/bubble/original/3X/4/9/49b829210ba6b1b8d96bb4ce5ba7024fc81afa72.png)

> yourTriggerNameForNoCaps

After the page has the elements on page, need to add workflows

 ![Screen Shot 2020-01-14 at 3.53.21 PM](https://us1.discourse-cdn.com/bubble/original/3X/7/f/7f76f5879adfae774a5a7a9511b91251d9e99a03.png) ![Screen Shot 2020-01-14 at 3.53.14 PM](https://us1.discourse-cdn.com/bubble/original/3X/0/9/090ae63bf2eee9d03a15d83f523ab35edbba3bb8.png)

For more information on this you can view the forum thread on the topic where I got the help I needed to get it to work.

> [@How to detect if the caps lock is on?](http://forum.bubble.io/t/how-to-detect-if-the-caps-lock-is-on/75541):
>
> I am in the process of following ux design suggestions for a password input…one of those suggestions is to show when the user has caps lock enabled. Any way to detect if that is the case through bubble or a available plugin?

For anything else in this set up that is needed, such as conditional formatting to show the check mark icons, color coding the helper text etc. please search on the forum.

One last thing is using the bubble provided password strength indicator…I still need to polish it up as you can see in the gif I get the yellow bar to appear without the first showing…either way.

You must use the input as set to content type password

![Screen Shot 2020-01-14 at 3.56.42 PM](https://us1.discourse-cdn.com/bubble/original/3X/1/a/1a18068f2f1494ccbe0e6cb24660684bfdc50f4e.png)

Then set up conditionals based on the password strength as generated by bubble

 ![Screen Shot 2020-01-14 at 3.57.27 PM](https://us1.discourse-cdn.com/bubble/original/3X/e/9/e906cf9690a5e3d4ac01a38a9d408cf59b79415b.png)

Check the forum post for more details

> [@\[New Feature\] Password strength on inputs](http://forum.bubble.io/t/new-feature-password-strength-on-inputs/45872):
>
> Hello, We just added an improvement to the input element. When the type of content is set to ‘password’, you’ll be able to get the [strength of the password](https://bubble.io/reference#Elements.GeneralConcepts.States.get_pw_strength), doing, for instance, [42%20AM] This returns a number between 0 and 100, 100 being a very strong password, and you can use this number to provide a feedback to users, as we did on our own homepage. [pw%20Strengh]

Hope this helps.

---

<div class="post-metadata">

**Author:** ![petter](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/petter/32/98626_2.png) [@petter](https://forum.bubble.io/u/petter)\
**Post date:** [January 14, 2020, 8:56am UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/2 "2020-01-14T08:56:32Z")

</div>

Excellent post @boston85719!

Thank you so much for putting it together and sharing!

---

<div class="post-metadata">

**Author:** ![mazorshimon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mazorshimon/32/66873_2.png) [@mazorshimon](https://forum.bubble.io/u/mazorshimon)\
**Post date:** [October 15, 2020, 9:42pm UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/3 "2020-10-15T21:42:31Z")

</div>

What a great post, thank you @boston85719!

---

<div class="post-metadata">

**Author:** ![dom.o.mensah](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dom.o.mensah](https://forum.bubble.io/u/dom.o.mensah)\
**Post date:** [April 13, 2022, 3:23pm UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/5 "2022-04-13T15:23:25Z")

</div>

Thank you…this is amazing and exactly what I needed

---

<div class="post-metadata">

**Author:** ![colinw](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/colinw/32/124221_2.png) [@colinw](https://forum.bubble.io/u/colinw)\
**Post date:** [April 21, 2022, 5:08pm UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/6 "2022-04-21T17:08:28Z")

</div>

Likewise - thanks for this post, helped me out a lot! Now just need to find how to have my input field changes trigger in realtime like yours shows in your demo video.

---

<div class="post-metadata">

**Author:** ![lindsay\_knowcode](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lindsay_knowcode/32/92967_2.png) [@lindsay\_knowcode](https://forum.bubble.io/u/lindsay_knowcode)\
**Post date:** [June 2, 2022, 7:01am UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/7 "2022-06-02T07:01:58Z")

</div>

It’s always amazing what gold nuggets you can find in the forum. Commenting to give this post the visibility it deserves. 🙂

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [June 2, 2022, 7:59am UTC](https://forum.bubble.io/t/how-to-verify-a-password-input/76194/8 "2022-06-02T07:59:49Z")

</div>

Thanks. It was in the end only those who took the arduous journey out to the Western US states during the gold rush, who then spent the time mining and scouring the land that found their gold nuggets.
