Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
validation code needed
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
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.
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
Reply


Messages In This Thread
validation code needed - by nats - 06-02-2012, 06:27 PM
RE: validation code needed - by supputuri - 06-02-2012, 10:02 PM
RE: validation code needed - by nats - 06-02-2012, 10:43 PM
RE: validation code needed - by supputuri - 06-02-2012, 11:53 PM
RE: validation code needed - by nats - 06-16-2012, 10:58 AM
RE: validation code needed - by Ankur - 06-16-2012, 05:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  XML input data validation with data in oracle tables using webservice smtripathi99 0 2,397 12-11-2012, 01:32 PM
Last Post: smtripathi99
  WordPress CMS validation with the website sanrag 0 2,111 11-22-2011, 12:11 PM
Last Post: sanrag
  Help needed to automate JavaTree object guin.anirban 0 1,921 07-16-2011, 11:20 PM
Last Post: guin.anirban
  validation tables and column in a oracle database ajayr1982 0 2,675 04-20-2011, 10:04 AM
Last Post: ajayr1982
  Page Validation for Web Application learnqtsw 2 6,614 10-08-2010, 04:15 PM
Last Post: A.Saini

Forum Jump:


Users browsing this thread: 2 Guest(s)