struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-685) Generic error message - Type Conversion Error Handling
Date Fri, 16 Mar 2018 13:33:01 GMT

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

ASF subversion and git services commented on WW-685:
----------------------------------------------------

Commit b492eaf0c7ed3309554488e01ae2401bb7ad0344 in struts's branch refs/heads/master from
Lukasz Lenart
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=b492eaf ]

Merge pull request #215 from aleksandr-m/feature/WW-685

WW-685 Add generic type conversion error message

> Generic error message - Type Conversion Error Handling
> ------------------------------------------------------
>
>                 Key: WW-685
>                 URL: https://issues.apache.org/jira/browse/WW-685
>             Project: Struts 2
>          Issue Type: Improvement
>            Reporter: Ricardo Lecheta
>            Assignee: Aleksandr Mashchenko
>            Priority: Major
>             Fix For: 2.6
>
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message