This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes problem in regular expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem in regular expression" Watch "problem in regular expression" New topic
Author

problem in regular expression

deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33



this code have a serious problem.. its designed to validate dates.. but even when a validate date is entered .. the helptext is not cleared..


the second problem is .. the chrome's interpreter is saying that my regular expression for validating email is out of range.. i checked the regular expression from a diffent file which is working .. both expressions are same.. but it alarming only on my html file..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63053
    
  69

As you saw in a previous post, using code tags and proper indentation can usually reveal issues a lot faster than unformatted code. Please be sure to UseCodeTags when posting code.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19693
    
  10

deepak bhai wrote:this code have a serious problem.. its designed to validate dates.. but even when a validate date is entered .. the helptext is not cleared..

That's true; your other validations have code which says "helpText.innerHTML = something" and your date validation doesn't have that.
deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33
my date validation code is not validating the date itself, its just sending it to validateRegEx function with the helpmessage. where if the date is invalid then the helptext.innerHTML value will be set as helpmessage. other wise it will cleared. my other codes are setting helptext.innerHTML in them because they are not sending there control to validateRegEx function except the email validation..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem in regular expression
 
It's not a secret anymore!