You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/05/22 15:51:30 UTC

Two arguements in validate parameter

Hello, I'm trying add the following arguments to the tapestry validate
parameter. The first one being tapestry's built in email validator and the
second being my custom validator. 

t:validate="email, prop:getFieldValidator('shiptoContactEmail')"

which results in this exception. 

java.lang.RuntimeException
Unexpected character ':' at position 12 of input string: email,
prop:getFieldValidator('shiptoContactEmail')

In a previous post, Robert said 

"Specifying the property prefix (eg: prop:, component:, validate:, etc.)
only
works at the beginning of the expression, and it is applied to the entire
expression. "

which would explain the exception, however I'm wondering how this should be
done. Should I pass back email in the fieldValidator and handle it on the
backend or is there another way to handle this on the frontend. 

Thanks,

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Two-arguements-in-validate-parameter-tp5713312.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Two arguements in validate parameter

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 22 May 2012 10:51:30 -0300, George Christman  
<gc...@cardaddy.com> wrote:

> Hello, I'm trying add the following arguments to the tapestry validate
> parameter. The first one being tapestry's built in email validator and  
> the second being my custom validator.
>
> t:validate="email, prop:getFieldValidator('shiptoContactEmail')"

The validator binding doesn't support property expressions. In other  
words, you should add the email validation in the getFieldValidator()  
method instead.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org