aspnet core controller datetime parameter bypasses modelvalid check
<p>I have a number of controllers of this form:</p>

<pre><code>public IActionResult GetSomething(int id, DateTime from) {
    ...
}
</code></pre>

<p>The <code>id</code> and <code>from</code> parameters are given on the query as query parameters. If <code>id</code> is not supplied, the <code>ModelValid</code> state is set to false. But if <code>from</code> is not supplied, ModelValid is true and from is set to 1900-01-01 00:00:00 (DateTime.Min).</p>

<p>How do I make ModelState false if a wanted DateTime parameter isn't supplied?</p>