aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Need help on Unique Javascript validation 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 "Need help on Unique Javascript validation" Watch "Need help on Unique Javascript validation" New topic
Author

Need help on Unique Javascript validation

Avinash Talari
Greenhorn

Joined: May 12, 2010
Posts: 3
Please help me in writing a javascript to validate string of the format "A23d:1234". First four digits of alphanumeric characters and then a colon and then four numeric characters. I am inputting 5 different strings of this format into a text area which has 5 rows ..each limited to 9 characters. If the format fails for any of the row an alert should be thrown. I am trying to use the substring function but facing issues in validating the string of each row.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Use a regular expression.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help on Unique Javascript validation