This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes validation check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validation check " Watch "validation check " New topic

validation check

Li Jenny
Ranch Hand

Joined: Apr 19, 2010
Posts: 57
I would like to do a validation check for textbox field.
only let the user input number range or just a number in the following format:

1) 11,12
if the user input 1 to 10, or other than the above format, then prompt a msg.
Amit Vinod Dali
Ranch Hand

Joined: Apr 14, 2010
Posts: 42
You can use JavaScript RegExp Object. Regular Expression generator
Li Jenny
Ranch Hand

Joined: Apr 19, 2010
Posts: 57
how to use this.?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Write a regular expression and use it to check the input--what does your regex look like so far?
I agree. Here's the link:
subject: validation check
It's not a secret anymore!