title: Validation error - The field Int32 must be a number - on string property
body: <p>I have a funny problem and I did not find the cause.
  In asp.net MVC application I have a form that saves some simple information. All fields can be stored neatly except one. This field (string) returns validation error "The Int32 field must be a number" but only if the sentences in the text contains a single digit number. For example, if the sentence is as follows:
  "Some simple sentence that contains the number 3" I'll get a validation error - "The Int32 field must be a number", if that same sentence transformed into:</p>
  
  <p>"Some simple sentence that contains the number 30" or "Some simple sentence that contains a 30%" - no errors</p>
  
  <p>Field property from a model:</p>
  
  <pre><code>    [Display(Name = "Some name")]
      [StringLength(500, ErrorMessage = "You can enter up to 500 characters.")]
      public string Akcija { get; set; } 
  </code></pre>
  
  <p>Next to that field I have one (string) field with the same property characteristics, and it is working properly.</p>
  
  <p>Clip from view:</p>
  
  <pre><code>&lt;div&gt;
  
              @Html.TextAreaFor(m =&gt; m.Akcija, new { style = "width:500px; height:100px;" })
              @Html.ValidationMessageFor(m =&gt; m.Akcija)
  
          &lt;/div&gt;
  </code></pre>
  
  <p>It can not be simpler than that, but the problem is around here.</p>
  
  <p>Do you have any suggestions?</p>
  
  <p>Edit:</p>
  
  <p>If I keep trying to save the changes it will be saved to the database regardless of the validation error. It seems to me that this is a JavaScript validation error or a bug</p>
  
  <p>Edit 2 - Generated HTML:</p>
  
  <pre><code>            &lt;textarea cols="20" data-val="true" data-val-number="The field Int32 must be a number." data-val-required="The Int32 field is required." id="Akcija" name="Akcija" rows="2" style="width:500px; height:100px;"&gt;
  </code></pre>
  
  <p>Web aplikacije i siteovi 3 sa 30% sniženja
                  </p>
  
  <p>I do not know where it comes from - this attribute "data-val-number =" The field Int32 must be a number. '" And " data-val-required = "The Int32 field is required.'"
  I'm not in the code imposed these rules</p>