title: remove required property from input field on form submit
body: <p>Model:</p>
  
  <pre><code>[Display(Name = "City"]
  [Required]
  [RegularExpression(@"^(?!\d$).*$"]
  [StringLength(20,MinimumLength = 2]
  public string City { get; set; }
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>@Html.LabelFor(x =&gt; x.City, new { @class = "control-label" })
  @Html.TextBoxFor(x =&gt; x.City, new {id="city" })
  </code></pre>
  
  <p>Script: </p>
  
  <pre><code>&lt;script&gt;
    $(document).ready(function () {   
      $("#identificationForm").submit(function (e) {
        var required=document.getElementById("city").required;
        console.log(required);
        // e.preventDefault();
       });
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to remove required property if some condition is met.Unable to do this this way.How can i achieve this?</p>