Announcement Announcement Module
No announcement yet.
commons validator i18n error messages Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • commons validator i18n error messages

    I have succesfully integrated commons-vildator into my spring app modifying the implementation slightly to take the configuration from a database and not an xml file.

    However i have one problem remaining. How do i get the error messages to appear decoded on the page when i use

    <spring:bind path="">
    <INPUT type="text" name="date" value="<c:out value="${status.value}"/>"/><c:out value="${status.errorMessage}"/><br/>

    I noticed that FieldCheck.validateIntRange sets a default message

    errors.rejectValue(field.getKey(),Resources.getMsg Key(va, field),Resources.getArgs(va, field),"???" + Resources.getMsgKey(va, field) + "???");

    All i see at the moment on the page is ???errors.range??? which is the default message defined in validation-rules.xml and not a decoded message using the users locale

    Hope someone can point me in the right direction

  • #2
    I managed toresolve the problem. I had an old version of the commons validator adaptor. I downloaded the spring-sandbox.jar and used the FieldCheck and Resource classes from that at which point i got my error messages decoded.