title: In which layer should the validations be done mainly in the context of DDD?
body: <p>This question might be asked a thousand of times but a lot of confusions and contradictions in the answers.</p>
  
  <p>I ask about the <strong>validations</strong> in the context of domain driven design.</p>
  
  <ol>
  <li>In which layer should the validations be done mainly ? </li>
  <li>Is it acceptable for the object to be in invalid state? because many answers said that it's okay and mainly because of historical data and the business rules may change over time and loading historical data might cause problems?</li>
  <li>Many implementations consider throwing exceptions in the domain layer and mapping the messages to the UI although Martin Fowler recommends to <a href="https://martinfowler.com/articles/replaceThrowWithNotification.html" rel="nofollow noreferrer">Replacing Throwing Exceptions with Notification in Validations</a>! When to return messages and when to throw exceptions in the validation context ?</li>
  <li><p>Many articles explain some tips or paths to follow like <a href="https://enterprisecraftsmanship.com/2016/09/13/validation-and-ddd/" rel="nofollow noreferrer">Vladimir Khorikov</a> and <a href="https://lostechies.com/jimmybogard/2016/04/29/validation-inside-or-outside-entities/" rel="nofollow noreferrer">jbogard</a> in their articles but in the comments they confess that they do things a wee differently now. Are these patterns still valid?</p></li>
  <li><p>Should I use framework like <a href="https://fluentvalidation.net/" rel="nofollow noreferrer">FluentValidation</a> and if I use it, Is this frame work used only in the application layer as an alternative to the <code>MVC annotations</code> ?</p></li>
  <li>When Should I use <code>Business Rule Framework (BRF)</code> instead?</li>
  </ol>
  
  <hr>
  
  <p>I know many questions here but they target the same spot(Validation in DDD).</p>
  
  <p>Note: I don't use <code>CQRS</code> pattern because it made the application so complex. 
  So I have (<code>domain layer,data layer, application layer(MVC), and shared kernel)</code></p>