title: ASP.NET Core 2.1 Attribute to set model value to lowercase
body: <p>I would like to know if there's a way to force the value of some properties to always be lowercase or uppercase when I receive the model at my controller. Preferably in a clean way, like using attributes.</p>
  
  <p>Example:</p>
  
  <p>Controller:</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;Model&gt; Post(Model model)
  {
      //Here properties with the attribute [LowerCase] (Prop2 in this case) should be lowercase.
  }
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class Model
  {
      public string Prop1 { get; set; }
  
      [LowerCase]
      public string Prop2 { get; set; }
  }
  </code></pre>
  
  <p>I've heard that changing values with a custom <strong><em>ValidationAttribute</em></strong> is not a good thing. Also decided to create a custom <strong><em>DataBinder</em></strong>, but didn't find exactly how I should implement it, when tried to, just received <em>null</em> in my controller.</p>