how to restrict password

how to restrict the password entry to be alphanumeric and should contain atleast one special characters using powerbuilder. Password length is already restricted from 6 to 10 chars,


LVL 15
Shaju KumbalathDeputy General Manager - ITAsked:
Who is Participating?
sandeep_patelConnect With a Mentor Commented:
use Match function as below

string ls_pwd
boolean lb_return
lb_return = Match(ls_pwd,"[~`!@#$%^&]")
If Not lb_return Then
     Messagebox('Invalid','Password must contain atleast one special character')
     Return 1
End If

You can include other characters in above pattern if you want them in password.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.