struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (WW-685) Generic error message - Type Conversion Error Handling
Date Fri, 02 Mar 2018 21:37:00 GMT


ASF GitHub Bot commented on WW-685:

aleksandr-m opened a new pull request #215: WW-685 Add generic type conversion error message
   Another one for 2.6. :)
   Note: Because of the `Object` in conversion errors map (`Map<String, Object> conversionErrors`)
there is no type check when switching to `Map<String, ConversionData>`, which can lead
to some errors.
   Note: The `ConversionData` can be improved and used later in other places.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Generic error message - Type Conversion Error Handling
> ------------------------------------------------------
>                 Key: WW-685
>                 URL:
>             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
> > 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:
> > is not a valid Number.
> > 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

View raw message