You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Titus Barik <ti...@barik.net> on 2005/06/05 22:53:21 UTC
Validator html:errors returns null for {0}
Hi all,
I'm trying to use the ValidatorForm feature of struts. I have a
validation.xml:
<form name="userForm">
<field property="email" depends="email">
<arg0 key="userForm.email"/>
</field>
</form>
which I've copied straight from the struts tutorial that validates an
e-mail address.
I have a JSP page:
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html xhtml="true">
<body>
<html:errors />
<html:form action="userAddressEdit">
<html:text property="email" />
<html:submit />
</html:form>
</body>
</html:html>
But when I type an invalid e-mail address, in html:errors I always get:
null is an invalid e-mail address.
What am I doing wrong? Am I missing a taglib?
Any help is greatly appreciated, as I can't figure this one out.
Thanks,
--
Titus Barik (titus@barik.net)
http://www.barik.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validator html:errors returns null for {0}
Posted by Titus Barik <ti...@barik.net>.
Titus Barik wrote:
> But when I type an invalid e-mail address, in html:errors I always get:
>
> null is an invalid e-mail address.
Figured it out. arg0 key refers to the key in the Properties file.
--
Titus Barik (titus@barik.net)
http://www.barik.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org