Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validating Password field
#2
Not Solved
Hi,

You need to use regular expression for that.Try the below one.
Code:
Set RegEx = CreateObject("VBScript.RegExp")  'Create Object
RegEx.Pattern = "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[[@#$^&*_-]).{6,12}" 'Set the pattern
strResult=RegEx.Test(strText) 'Test string,Replace strText with ur pwd
If strResult=False Then
msgbox "Invalid Password"
Else
msgbox "Valid Password"
End If
Set RegEx =Nothing

Regards,
Ankesh


Reply


Messages In This Thread
Validating Password field - by John087 - 06-16-2012, 08:36 PM
RE: Validating Password field - by Ankesh - 06-18-2012, 04:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can we open a password protected zip file using QTP? arunarora1990 2 4,963 07-03-2011, 09:46 AM
Last Post: rajpes
  Regular Expression for a Password ritesh 3 4,559 11-16-2010, 03:54 PM
Last Post: ngocvo3103

Forum Jump:


Users browsing this thread: 1 Guest(s)