title: How would I make separate duplicated logic in Value Objects
body: <p>I'm learning DDD (Domain Driven Design) and reading Clean Architecture. I found out about Value Objects and have been reading more about them and have implemented some in my application which could be found <a href="https://gist.github.com/Tyler0722/73ec826be814b8e54b9f6ae6ae836409" rel="nofollow noreferrer">https://gist.github.com/Tyler0722/73ec826be814b8e54b9f6ae6ae836409</a>.</p>
  <p>Value Objects are created by calling the factory method which performs validation and follows the separation of concerns principle. The problem is I have two Value Objects where the validation logic is duplicated. Username and QuizTitle where the only difference is <code>MAX_LENGTH</code> which violates the DRY principle. I was wondering if anyone knew anyway I could make this DRY.</p>