• Post Reply Bookmark Topic Watch Topic
  • New Topic

Email validation problem when using t:validateEmail tag  RSS feed

 
Mohammed aashik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
H,
I'm new to jsf. I'm using jsf 1.2(myfaces). i have placed the tomahawk jar in lib folder.
I'm trying to use <t:validateEmail> tag

my code is look this

<t:inputText id="email" value="#{bean.emailAddress}" required="true">
<t:validateEmail message="Invalid email"/>
</t:inputText>

<hutputLabel for="email" value="Email" style="color:red"/>

when i run the jsp page

its show error like this

java.lang.IllegalArgumentException: Cannot invoke org.apache.myfaces.validator.ValidatorBaseTag.setMessage - argument type mismatch
17:10:48,515 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
17:10:48,515 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
17:10:48,515 ERROR [STDERR] at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
17:10:48,515 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)


when i remove the <t:validateEmail message="Invalid email"/> tag
the page is loading successfully..


Thanks and regards
asif.
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi asif

Instead of <t:validateEmail message="Invalid email"/>

You can use <t:validateEmail detailMessage="Invalid Email" />

Try this one

Venkat
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!