This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Input parameter check function ??

 
Bikash Paul
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to check input parameter of serach text box which is supplied by user.User have to give input parameter for serach like this(a%,b%,c% etc.)if they give any input parameter other than this then i want to give alert message to user.Can any one please guide me how i can write this function.
Thanks & Regards
Bikash
 
qu shihong
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should learn regular expression.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the basic idea....

Eric
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually I do such thing server side.
I mean, it is easy to bypass JS validation and send anything to your server.
That includes quotes, semicolons and SQL commands
 
Bikash Paul
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,
Thanks for ur basic idea.
Thanks & Regards
Bikash
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic