title: MVC Client side validation are not working in partial view
body: <p>I have a partial view which gets populated in modal body of my home page of MVC project. Partial view holds the login form as follows - </p>
  
  <pre><code>@using (Html.BeginForm())
  {
  @Html.AntiForgeryToken()
  
  &lt;div class="row"&gt;
      &lt;div class="col-xs-6"&gt;
          &lt;div class="well"&gt;
              &lt;div class="form-horizontal"&gt;
                  @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          @Html.LabelFor(model =&gt; model.UserEmailId, htmlAttributes: new { @class = "control-label" })
                          @Html.EditorFor(model =&gt; model.UserEmailId, new { htmlAttributes = new { @class = "form-control", placeholder = "example@gmail.com" } })
                          @Html.ValidationMessageFor(model =&gt; model.UserEmailId, "", new { @class = "text-danger" })
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          @Html.LabelFor(model =&gt; model.UserPassword, htmlAttributes: new { @class = "control-label" })
                          @Html.EditorFor(model =&gt; model.UserPassword, new { htmlAttributes = new { @class = "form-control" } })
                          @Html.ValidationMessageFor(model =&gt; model.UserPassword, "", new { @class = "text-danger" })
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="checkbox"&gt;
                      &lt;label&gt;
                          &lt;input type="checkbox" name="remember" id="remember"&gt; Remember login
                      &lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;button type="button" class="btn btn-success btn-block" onclick="location.href='@Url.Action("Login", "Home")'"&gt;
                  Login
              &lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-xs-6"&gt;
          &lt;p class="lead"&gt;Sign up with&lt;/p&gt;
          &lt;ul class="list-unstyled" style="line-height: 2"&gt;
              &lt;li&gt;&lt;span class="fa fa-check text-success"&gt;&lt;/span&gt; See all your orders&lt;/li&gt;
              &lt;li&gt;&lt;span class="fa fa-check text-success"&gt;&lt;/span&gt; Fast re-order&lt;/li&gt;
              &lt;li&gt;&lt;span class="fa fa-check text-success"&gt;&lt;/span&gt; Save your favorites&lt;/li&gt;
              &lt;li&gt;&lt;span class="fa fa-check text-success"&gt;&lt;/span&gt; Fast checkout&lt;/li&gt;
              &lt;li&gt;&lt;span class="fa fa-check text-success"&gt;&lt;/span&gt; Get a gift &lt;small&gt;(only new customers)&lt;/small&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="/read-more/"&gt;&lt;u&gt;Read more&lt;/u&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  }
  </code></pre>
  
  <p>I am using a partial classes to define my data validations for the models(so that they wont get missed if I update my db first models) -</p>
  
  <pre><code>public class UserMetadata
  {
      [Display(Name ="Username")]
      [EmailAddress(ErrorMessage ="Please enter your email address")]
      [Required(ErrorMessage ="Required field")]
      public string UserEmailId { get; set; }
  
      [Display(Name ="Password")]
      [DataType(DataType.Password)]
      [Required(ErrorMessage = "Username is required")]
      [StringLength(15, ErrorMessage = "Must be between 8 and 15 characters", MinimumLength = 8)]
      public string UserPassword { get; set; }
  }
  </code></pre>
  
  <p>The validations are not working on the client side. They are not getting triggered. Am I missing some script reference?</p>
  
  <p>I already have "ClientValidationEnabled" set to true in my web.config.
  Please help. Thanks!</p>
  
  <p>Edit - 
  The following is all included in my layout -</p>
  
  <pre><code>&lt;link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"&gt;
  &lt;link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'&gt;
  &lt;link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'&gt;
  &lt;link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'&gt;
  &lt;script src="https://use.fontawesome.com/2d83329334.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery.validate.unobtrusive.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery.validate.js"&gt;&lt;/script&gt;
   @Styles.Render("~/Content/css")
  @Scripts.Render("~/bundles/modernizr")
  </code></pre>