title: jQuery Validate - Only two fields of four allowed to be filled - how to validate?
body: <p>I have four input fields:</p>
  
  <pre><code>MaxWidth
  MaxHeight
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Width
  Height
  </code></pre>
  
  <p>I want to validate that only <code>MaxWidth + MaxHeight</code> or <code>Width + Height</code> has been entered. The user shouldn't be able to submit values for both sets.</p>
  
  <p>Any idea?</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>i'm using the jquery.validate.min.js supplied with .NET MVC3 default application</p>
  
  <p>This is what i basicly need validation of</p>
  
  <pre><code>    &lt;-- Scale a picture to one of the max attributes and keeping the aspect ratio --/&gt;
      &lt;input type="text" name="cmdMaxWidth" /&gt;&lt;br /&gt;
      &lt;input type="text" name="cmdMaxHeight" /&gt;&lt;br /&gt;
      &lt;br /&gt;
      &lt;-- Scale a picture to the exact width and height attributes, still keeping the aspect ratio but addting whitespace for the rest --/&gt;
      &lt;input type="text" name="cmdWidth" /&gt;&lt;br /&gt;
      &lt;input type="text" name="cmdHeight" /&gt;&lt;br /&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>I've rewritten my form to reflect the UI/UX setup descriped by Mohen in the commands on his answer.</p>
  
  <p>BUT i'll reward Jayendra Patil with the "accepted" answer, but i'll "flag up" Mohens answers and suggestions</p>
  
  <p>Kind Regards
  \T</p>