Wednesday, 11 January 2012

Setting for Commons Validator

Dear All,

Please add the following entries to the WEB-INF/applicationContext.xml to enable commons validator.

<bean id="validatorFactory" class="org.springmodules.validation.commons.DefaultValidatorFactory">
   <property name="validationConfigLocations">
     <list>
       <value>WEB-INF/validator-rules.xml</value>
       <value>WEB-INF/validations.xml</value>
     </list>
   </property>
</bean>
<bean id="beanValidator" class="org.springmodules.validation.commons.DefaultBeanValidator">
<property name="validatorFactory" ref="validatorFactory"/>
</bean>

Thanks and Regards,
Vivek Mehta

No comments:

Post a Comment