Announcement Announcement Module
Collapse
No announcement yet.
Personalization of binding error messages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Personalization of binding error messages

    Hi,

    I want to personalize errors messages that occur during the binding of form fields into beans.
    Here is the kind of messages:

    Failed to convert property value of type [java.lang.String] to required type [int] for property 'champ2'; nested exception is java.lang.NumberFormatException: For input string: "132f"

    Thanks for your help.
    Thierry

  • #2
    Someone tell me few day ago :

    <<<
    For customize the error message that appears when the conversion is not successful. This is done by adding messages to your messages.properties (or whatever it is named) file like this:

    typeMismatch.java.util.Date=The value must be a date in the form 'dd/MM/yyyy'.
    >>>

    + d'infos : http://www.springframework.org/docs/...sResolver.html.

    Good luck,

    Fabien.

    Comment


    • #3
      Personalization of binding error messages

      Hello,

      I try it and it works fine
      Thanks for your help...
      Thierry

      Comment

      Working...
      X