title: Symfony - awkward Password Length violation on partial User entity update through a form containing no password field
body: <p>In Symfony 5.1 project I have a form that indents to partially update User entity records (some fields except of the password and email).
  The form is generated with a FormBuilder class - a sub-class that extends UserType class, with &quot;password&quot; removed from the builder:</p>
  <pre><code>class UserProfileSubType extends UserType {
  public function buildForm(FormBuilderInterface $builder, array $options) {
      parent::buildForm($builder, $options);
      
      $builder-&gt;remove('email')
              -&gt;remove('password');
  }
  </code></pre>
  <p>Thanks to that the HTML form generated in Twig template does not contain &quot;password&quot; field.</p>
  <p>But, the form actually <strong>fails validation</strong> due to &quot;Password cannot be longer than 20 characters&quot;. Indeed I have this assertion in the User entity:</p>
  <pre><code> * @Assert\Length(
   *      max = 20,
   *      maxMessage = &quot;Password cannot be longer than {{ limit }} characters.&quot;
   * )
  </code></pre>
  <p>The point is that a hashed password is indeed longer then 20 chars. e.g.:
  <code>$argon2id$v=19$m=65536,t=4,p=1$c21aeTNTbmsNL3dsaT3Y4RQ$E1B0bBI/SPjpIOItOFN2xs1d131YWTtDCw79n4fXJE</code></p>
  <p>When, for testing purposes, I modified the length assertion to <code>max = 100,</code> the problem is gone (worked around) as the hashed password length is 97 chars. Nevertheless, <strong>why the form is validated against the password length at all?</strong></p>
  <p>Is there any way to avoid the form validation error with lower value of password max length value?</p>