• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation check

 
Li Jenny
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use JavaScript RegExp Object. Regular Expression generator
 
Li Jenny
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to use this.?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a regular expression and use it to check the input--what does your regex look like so far?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic