-
Aug 5th, 2009, 06:37 PM
#1
issue in displaying correct error messages using commons validator
I'm using a WizardFormController and using a ConfigurablePageBeanValidator to validate form fields accross multiple pages.
Here are some snippets of text from a few relevant files:
validator.xml
......
<formset>
<form name="customer">
<field property="firstName" depends="required" page="0">
<arg0 key="required.firstName" />
</field>
.......
errors.properties
required.firstName=First Name field is mandatory (make it up if you don't have one)
myapp-servlet.xml
.......
<bean id="messageSource" class="org.springframework.context.support.Resourc eBundleMessageSource">
<property name="basenames" >
<list>
<value>messages</value>
<value>errors</value>
</list>
.......
The problem:
The validation seems to be working fine, but the error messages displayed next to the html fields are not from the error.properties but instead "errors.required" is displayed on the html page.
This completely beats me. What could be going wrong?
Appreciate any help on this.
Regards,
Debarshi
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules