Password Validation Trouble. Upper and Lower Case Check

I’ve been searching the web and these forums for help with form validation/password and I’ve found a few examples, not many, but I can’t get any of them to work on my particular prototype.

I need to check if the password field contains any uppercase and lowercase letters.

Here’s a screenshot of the logic i have set up.

In the password requirements section, each item is a dynamic panel and has 3 states. Default, Pass and Fail.

My intention is: if a capital letter is found, set to green. If not found, set to red. I’m using the onKeyUp event instead of lostFocus for better UX/more responsive feedback.

One thing that’s odd is that on a few configurations I’ve tried if I start the field text with a capital letter, it will trigger the capital letter password requirement event to be green. But only if the first letter is capital. If it has a capital anywhere in there, it doesn’t work.

In the screenshot example of the logic, you’ll see I’m trying a few different approaches I’ve found online. None of them work though.

Any help is appreciated

There’s some comparisons you can do to determine if a string has upper or lowercase letters.

For example if PasswordField.text equals PasswordField.text.toLowerCase() then you know it has no uppercase letters because the string did not change even after you force all letters to be lowercase; they all already were.

If PasswordField.text equals PasswordField.text.toUpperCase() then you know it has no lower case letters.

1 Like

So in your example, would I use that syntax?

I.e. PasswordField.text? Or would I do LVAR1.text?

And would I put both of those statements in the value fields of the condition builder?

I’m trying both in this example and still can’t figure out what I’m doing wrong.

wow. looks like all my posts have been hidden because it had screen shots. super lame.

I think I got it working tho.

Yeah LVAR1 is just the default name for a local variable. You can change it to whatever you want.

If you set the local variable to “Widget” use .text but if you set it to “Text of widget” you can omit .text

hey david - do you happen to have a file to share? I am stuck as well.

Hi nywebdiva,

I’ve attached an example file of what DavidSparks was going for, where the DP changes to its “Pass” (green) state when the text field contains an uppercase character, and changes to its “Fail” (red) state if otherwise.

Lmk if you have any questions!

PwUppercaseValidation.rp (54.5 KB)

thanks so much for your help - a little delayed answering , sorry!