title: Working with Data Annotations with Blazor
body: <pre><code>    &lt;EditForm Model=&quot;CurrentCustomerSubmission&quot; OnValidSubmit=&quot;ToSubmissionPage&quot;&gt;
          &lt;DataAnnotationsValidator/&gt;
          &lt;div class=&quot;wrap-login100 p-l-50 p-r-50 p-t-72 p-b-50&quot;&gt;
              &lt;form class=&quot;login100-form validate-form&quot;&gt;
                  &lt;span class=&quot;login100-form-title p-b-59&quot;&gt;
                      Sign Up
                  &lt;/span&gt;
  
                  &lt;div class=&quot;wrap-input100 validate-input&quot; data-validate=&quot;First Name is required&quot;&gt;
                      &lt;span class=&quot;label-input100&quot;&gt;First Name&lt;/span&gt;
                      &lt;input class=&quot;input100&quot; type=&quot;text&quot; name=&quot;firstName&quot; placeholder=&quot;First Name...&quot; @bind-value=&quot;@CurrentCustomerSubmission.customerFirstName&quot; /&gt;
                      &lt;span class=&quot;focus-input100&quot;&gt;&lt;/span&gt;
                  &lt;/div&gt;
  </code></pre>
  <p>From my Model class</p>
  <pre><code>public class CustomerModel
  {
      [Required]
      [StringLength(20, ErrorMessage = &quot;First Name too long (20 letter limit)&quot;)]
  </code></pre>
  <p>when I click submit on my form, no validation occurs and the form refreshes and all data is missing.</p>