[ 
http://issues.apache.org/jira/browse/TAPESTRY-413?page=comments#action_12316250 
] 

Howard M. Lewis Ship commented on TAPESTRY-413:
-----------------------------------------------

Having a way to reference a bean would be quite nice; that would keep the 
validators string mostly declarative, but allow an "escape" to when it is 
insufficiently expressive.

Currently, you can put the specific error message in brackets:

validators:required[You must supply a UserId.],minLength=5[UserIds must be at 
least five characters long.]

What's missing is an easy way to access a localized message, rather than an 
inline literal message.

> Simple change of standard validator messages
> --------------------------------------------
>
>          Key: TAPESTRY-413
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-413
>      Project: Tapestry
>         Type: Wish
>     Reporter: Ron Piterman

>
> It seems the new 'validators' is deprecating the old one. 
> The new Validator format is very comfortable and easy to use and extend. 
> However if one wishes to use one of the standard validators with a custom 
> message, it requires one to abandon the elegant way validators are defined 
> and create a List of beans "manually". 
> It would be nice if one could integrate a custom message in the existing 
> format.
> Suggestions:
> validators="minLength('hey, to short...')=5,...
> or "minLength(field.password.to-short)=5,...
> or "minLength(ognl:.../message:...)=5,...
> or use a syntax that reference a bean instead of a validator:
> validators="required,(myMinLength),..."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to