cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
prabhu_jey
Level 3

Rule to validate the password variable - Password policy

Jump to solution

I am trying to set the min length for one of my password variable. The text box should not accept a password string with less than 6 characters.

 

I tried using a regexp match rules as below

$INPUT_PASS$  doesnotmatch   /^.{6,}$/

$INPUT_PASS$  doesnotmatch   "/^.{6,}$/"

$INPUT_PASS$  doesnotmatch    "[0-9a-zA-Z]{6,}"

 

nothing seems to be working.

Could you please help me on this?

0 Kudos
(1) Solution

Hi prabhu_jey,

To display a warning dialog box we will have to use a
"Show Message Dialog" action instead of Jump to target action.
Add the "Show Message Dialog" action just after the Get user input
panel. Customize title, label & message.
For Button 0 , select "Return to Previous panel" option.
Attach the above Match Regular expression rule
to "Show Message Dialog" action.
$INPUT_PASS$ Does not match [0-9a-zA-Z]{6,}

Dialog box will now be shown when validation fails.
Screenshot_3.png attached.
Hope this helps.

View solution in original post

(4) Replies
VineethaNair
Level 6

Hi ,

Add the regular expression [0-9a-zA-Z]{6,}  without double quotes.

Add a "Add Jump Label"  action above the Get User Input panel
&  add a "Jump to Target" action after the Get User Input panel.
Set its jump to target to the Jump label created.
Add Match Regular expression rule to  "Jump to Target" action :
$INPUT_PASS$   Does not match  [0-9a-zA-Z]{6,}

Navigation will now be done to the next panel only if the password
matches the regular expression. Hope this helps.

Thanks Vineetha for your help. It is working as expected. Much appreciated !!  🙂

Is it possible to have a dialog box in the jump to scenario??

If the password policy is not met, it should display a warning dialog box?

 

 

0 Kudos

Hi prabhu_jey,

To display a warning dialog box we will have to use a
"Show Message Dialog" action instead of Jump to target action.
Add the "Show Message Dialog" action just after the Get user input
panel. Customize title, label & message.
For Button 0 , select "Return to Previous panel" option.
Attach the above Match Regular expression rule
to "Show Message Dialog" action.
$INPUT_PASS$ Does not match [0-9a-zA-Z]{6,}

Dialog box will now be shown when validation fails.
Screenshot_3.png attached.
Hope this helps.

Thank you so much Vineetha, That works like a charm!!

 

0 Kudos