• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Email Validation

 
vinay abhishek
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to have a javascript based EMAIL validation for a sign up page in my application and the java script is as follows(Reference:w3schools email validaton) When I use it in netbeans I get the following error in the IF loop line
"Fatal Error: The content of elements must consist of well-formed character data or markup." Please Help...

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65125
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the eclipse JavaScript validation is not going to give you accurate results, turn it off. Or use a better IDE.

It almost sounds as if it's trying to validate it as XML.

P.S. if statements are not "loops"
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65125
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code does have problems though, not the least of which is inconsistent return points.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:It almost sounds as if it's trying to validate it as XML.


Perhaps the Javascript code is embedded in an XHTML document. In which case the editor would be complaining about the unescaped < characters, wouldn't it?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65125
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be smart enough to know that inside a script block, that angle brackets are not elements.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65125
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. I still don't know why people are still using XHTML -- it's a dead horse. But then again, people are still using scriptlets in JSPs 10 years after their obsolescence!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic