You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Tom Schneider (JIRA)" <ji...@apache.org> on 2007/02/18 08:25:16 UTC

[jira] Commented: (WW-685) Generic error message - Type Conversion Error Handling

    [ https://issues.apache.org/struts/browse/WW-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40175 ] 

Tom Schneider commented on WW-685:
----------------------------------

Although it is not trivial to figure out, it is possible. I've already outlined on the struts mailing list on how to do this, so please search the archives.  Longer term, I'd like to see this improved for struts2

> Generic error message - Type Conversion Error Handling
> ------------------------------------------------------
>
>                 Key: WW-685
>                 URL: https://issues.apache.org/struts/browse/WW-685
>             Project: Struts 2
>          Issue Type: Improvement
>            Reporter: Ricardo Lecheta
>         Assigned To: Rainer Hermanns
>             Fix For: Future
>
>
> To change the default message "invalid field value for field "xxx"", 
> you can put this line in the Action.properties
> > invalid.fieldvalue.[propertyName]
> But will be useful if there is a way to do a generic custom message to any type? For example a custom message for Dates, double, boolean, etc:
> > invalid.fieldvalue.For_All_Dates=This is not a valid date.
> I don´t know how to implement it, but could be like this:
> > invalid.fieldvalue.java.lang.Integer=This is not a valid Number.
> > invalid.fieldvalue.java.util.Date=This is not a valid Date.
> -------------
> I tried the following examples, but them doesn´t work:
> invalid.fieldvalue.*=Invalid Date.
>  and
> invalid.fieldvalue.[*]=Invalid Date.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.