06-02-2012, 11:53 PM
Hi Nats,
Yes we can handle this using Regular expression too. You have to create a regular expression object and then create a pattern such that it will exclude the characters (~,^).
Yeah Script which I have provided will work for anita^,~rohan by using the instr function rather than doing direct validation for the characters. please find the below updated code.
Yes we can handle this using Regular expression too. You have to create a regular expression object and then create a pattern such that it will exclude the characters (~,^).
Yeah Script which I have provided will work for anita^,~rohan by using the instr function rather than doing direct validation for the characters. please find the below updated code.
Code:
NegativeTest Dialog("Login").WinEdit("Agent Name:"),"ani~ta"
Public Function NegativeTest(objWebEdit,Input)
If Instr(Input, "~") >0 Then
'Logic to enter the data and validate the message
objwebEdit.Set Input
msgbox "Input as " & Input
ElseIf Instr(Input, "^") >0 Then
'Logic to enter the data and validate the message
objWebEdit.Set Input
msgbox "Input as " & Input
ElseIf Len(Input)<4 Then
'Logic to enter the data and validate the message.
objWebEdit.Set Input
msgbox "Input less than 4 Charecters"
Else
msgbox "Please send the proper input."
End If
End Function
Thanks,
SUpputuri
SUpputuri