title: How do i validate a date using combination of fields using the Struts validator
body: <p>If i have 3 text fields on a form how can i use the struts validator to check that a compination of all 3 fields should form a valid date. </p>
  
  <p>For example</p>
  
  <pre><code>&lt;form action="/test"&gt;
  
    &lt;input type=text name=day&gt; 
  
    &lt;select name=month&gt;
    &lt;option value=JAN&gt;JAN&lt;/option&gt;
    &lt;option value=JAN&gt;JAN&lt;/option&gt;
    &lt;option value=JAN&gt;FEB&lt;/option&gt;
       ---
      ---
    &lt;option value=DEC&gt;DEC&lt;/option&gt;
   &lt;/select&gt;
  
   &lt;input type=text name=year&gt; 
  
  &lt;/form&gt;
  </code></pre>
  
  <p>In the struts validator i can do something like this</p>
  
  <pre><code> &lt;field
                  property="day"
                  depends="required,mask"&gt;
                      &lt;arg key="myForm.day"/&gt;
                      &lt;var&gt;
                          &lt;var-name&gt;mask&lt;/var-name&gt;
                          &lt;var-value&gt;^[0-9]*$&lt;/var-value&gt;
                      &lt;/var&gt;
              &lt;/field&gt;         
  </code></pre>
  
  <p>But how can i check that day+Month+year is a valid date? including Februaries and leap years? </p>