This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

textbox validation in javascript  RSS feed

 
Yell Srik
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to do a validation of my checkbox so that the only valid values that are allowed are
a to z, A to Z, aa to zz and AA to ZZ.

i am using the following code to acheive this:



But it is displaying the alert message even if i enter a valid value like 'aa'?

Can u tell me where i am going wrong?? I want to know if my reference string is given properly?

Thanks in advance.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
um, why are you checking for 1 when it is returning true/false?

Eric
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!