title: How to give range to birthday (with attributes)?
body: <p>I have this class</p>
  <pre><code>public class PersonPatchModel
  {
      [StringLength(20, MinimumLength = 2, ErrorMessage = &quot;Person {0} Length Must Be Between {2} to {1}&quot;)]
      public string? FirstName { get; set; }
  
  
      [StringLength(20, MinimumLength = 2, ErrorMessage = &quot;Person {0} Length Must Be Between {2} to {1}&quot;)]
      public string? LastName { get; set; }
  
  
      public DateTime Birthday { get; set; }
  
  
      [StringLength(1500, MinimumLength = 500, ErrorMessage = &quot;Person {0} Length Must Be Between {2} to {1}&quot;)]
      public string? Biography { get; set; }
  
  
      [Range(120, 250, ErrorMessage = &quot;Person {0} Must Be Between {1} to {2} cm&quot;)]
      public int? Height { get; set; }
  }
  </code></pre>
  <p>How can I give a range to birthday (from 1900 until this.date - 7) ?
  Everywhere is written the solution using this attribute - [DisplayFormat(DataFormatString = &quot;{0:d}&quot;)] but seems it doesn't work, the date in mssql still like this 1976-08-02 00:00:00.0000000.</p>