wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validation check " Watch "validation check " New topic
Author

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
2)1-10,11-20
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
Author
Rancher

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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: validation check
 
Similar Threads
struts date vaidator problem
Struts Form Bean
Regular Expression
number formats
validating user input for number of seats