• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

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,

thanks

shaju
0
Shaju Kumbalath
Asked:
Shaju Kumbalath
1 Solution
 
sandeep_patelCommented:
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.

Regards,
Sandeep


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now