title: How to use from EnterpriseLibrary Validation Instead DataAnnotations Attribiute in mvc ajax form?
body: <p>I have a model like this </p>
  
  <pre><code>using Microsoft.Practices.EnterpriseLibrary.Validation;
  using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
  
  namespace MvcValidationTest.Models
  { 
      public class Person
      {
  
          [NotNullValidator(MessageTemplate = "FullName Is required!!!")]
          public string FullName { get; set; }
  }
  </code></pre>
  
  <p>When I use from Html.BeginForm() like this</p>
  
  <pre><code> @using (Html.BeginForm()) {
  
  &lt;fieldset&gt;
      &lt;legend&gt;Person&lt;/legend&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.FullName )
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.FullName )
          @Html.ValidationMessageFor(model =&gt; model.FullName )
      &lt;/div&gt;
          &lt;p&gt;
          &lt;input type="submit" value="Create" /&gt;
      &lt;/p&gt;
  &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>When i submit form and FullName is empty... ValidationMessage show to me.
  But when I Use from Ajax.BeginForm() like this </p>
  
  <pre><code> @using (Ajax.BeginForm("Create", "Home", new AjaxOptions { HttpMethod = "post" }))
    &lt;fieldset&gt;
      &lt;legend&gt;Person&lt;/legend&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.FullName )
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.FullName )
          @Html.ValidationMessageFor(model =&gt; model.FullName )
      &lt;/div&gt;
          &lt;p&gt;
          &lt;input type="submit" value="Create" /&gt;
      &lt;/p&gt;
  &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>When i submit form and FullName is empty... ValidationMessage does not show to me.</p>