title: How to pass an argument to errors.rejectValue() which is another property of a ResourceBundle in Spring MVC 3?
body: <p>I want to pass the ResourceBundle's (globalmessage.properties) property name "<strong>atm.number</strong>" instead of the hard-coded text "Número de cajero" as an argument of the "<strong>errors.required</strong>" property. How would I do that in a Validator? </p>
  
  <p><strong>ReporteIncidenciaValidator (Validator):</strong></p>
  
  <pre><code>public class ReporteIncidenciaValidator implements Validator {
  
      public boolean supports(Class&lt;?&gt; clazz) {
          return ReporteIncidencia.class.isAssignableFrom(clazz);
      }
  
      public void validate(Object target, Errors errors) {
          ReporteIncidencia reporteIncidencia = (ReporteIncidencia) target;
          if (StringUtils.isBlank(reporteIncidencia.getNumeroCajero())) {
              errors.rejectValue("numeroCajero", "errors.required",
                  new Object[]{"Número de cajero"}, "");
          }
  
      }
  }
  </code></pre>
  
  <p><strong>globalmessage.properties:</strong></p>
  
  <pre><code>errors.required={0} es requerido.
  atm.number=Número de cajero
  </code></pre>
  
  <p><strong>servlet-context.xml:</strong></p>
  
  <p>...</p>
  
  <pre><code>&lt;beans:bean id="messageSource"
    class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
      &lt;beans:property name="basename" value="classpath:globalmessages" /&gt;
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>...</p>