title: MVC3 Attribute validation question
body: <p>I'm getting odd behavior with my validation in my view.  </p>
  
  <p>My model has this property.</p>
  
  <pre><code>    [Display(Name = "Overflow Capacity")]
      [RegularExpression(@"[-+]?[0-9]*\.?[0-9]?[0-9]", ErrorMessage = "Number required.")]
      [Range(0,9999.99,ErrorMessage = "Value must be between 0 - 9,999.99")]
      public decimal OverFlowCapacity { get; set; }
  </code></pre>
  
  <p>My view has this:</p>
  
  <pre><code>&lt;tr&gt;
     &lt;td&gt;@Html.LabelFor(m=&gt; m.OverFlowCapacity)&lt;/td&gt;
     &lt;td&gt;@Html.EditorFor(m=&gt;m.OverFlowCapacity)&lt;/td&gt;                                               
     &lt;td&gt; @Html.ValidationMessageFor(model =&gt; model.OverFlowCapacity)&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>If I enter a value like 'ABC', I get the validation message 'Number required'
  If I enter a value of 999999, I get the validation message 'Value must be between 0 - 9,999.99'</p>
  
  <p>Both of those messages are received when I tab off the text box as expected.
  When I leave the text box value empty and tab off, I get no errors, as expected.  </p>
  
  <p>However, when I submit, I get a validation message 'The Overflow Capacity field is required.'</p>
  
  <p>I don't know where this is coming from.  I've tried removing all validation attributes from the model, and still get the 'required' message.  I'm at a loss.</p>
  
  <p>Here are the scripts I've referenced.</p>
  
  
  
  
  
  
  
  
  
  <p>I have other issues with <a href="http://foolproof.codeplex.com" rel="nofollow" title="Data Annotation validation extensions">mvcfoolproof</a> that I may post later. I'm wondering if this isn't somehow responsible for my problems.</p>