title: Angular reactive forms - get maxlength?
body: <p>I'm using angular reactive forms for a component library, and there are some requirements for the project that would be made much easier if I could just get the associated maxlength validator (if one exists) inside a form control (it's supposed to show how many characters are left when the EU is typing)</p>
  <p>Specifically, I want to do it from <em>within the component</em>, based on whatever maxlength validator was used, as this is a generic branded component library for use within my company.</p>
  <p>As far as I can tell, the only way to do this is to pass in the maxlength separately from the validators - but figured I'd ask The Internets to see if there's a cooler way.</p>
  <p>I've implemented (and modernized for angular 12) the ControlValueAccessorConnector solve from <a href="https://medium.com/angular-in-depth/dont-reinvent-the-wheel-when-implementing-controlvalueaccessor-a0ed4ad0fafd" rel="nofollow noreferrer">https://medium.com/angular-in-depth/dont-reinvent-the-wheel-when-implementing-controlvalueaccessor-a0ed4ad0fafd</a> - so I have access to all those properties.</p>
  <p>Any help - or a validation that what I'm looking for is not gonna happen - would be appreciated!</p>