Announcement Announcement Module
Collapse
No announcement yet.
Validator Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validator

    Hallo,

    i have a problem with the validator.

    The rejectValue will be called, but no error message will be shown on the page. I tested it with the debugger.
    here my code:

    Validator:
    errors.rejectValue(invalid.targetNumbersString,"Zi elrufnummern ungültig");

    errors.properties in src/main/ressources
    invalid.targetNumbersString

    the jsp
    <form:textarea path="targetNumbersString" cols="35" rows="4" />
    <form:errors path="targetNumbersString" cssClass="error"/>

    my xml:
    <bean id="messageSource" class="org.springframework.context.support.Resourc eBundleMessageSource">
    <property name="basenames">
    <list>
    <value>errors</value>
    <value>messages</value>
    </list>
    </property>
    </bean>

    Plz help.
    Thanks

  • #2
    I guess
    Code:
    errors.rejectValue(invalid.targetNumbersString,"Zi elrufnummern ungültig");
    is
    Code:
    errors.rejectValue("invalid.targetNumbersString","Zi elrufnummern ungültig");
    right?

    and the "invalid.targetNumbersString" key has a value in the properties file?

    Comment

    Working...
    X