#30776: AuthenticationForm's username field doesn't set maxlength HTML 
attribute.
------------------------------+----------------------------------------
     Reporter:  felixxm       |                    Owner:  Sam Reynolds
         Type:  Bug           |                   Status:  assigned
    Component:  contrib.auth  |                  Version:  master
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+----------------------------------------

Comment (by Carlton Gibson):

 OK 2ยข here... :)

 Given this:

 {{{
 class UsernameField(forms.CharField)
 }}}

 ... I think I prefer setting `max_length` in `UsernameField.__init__()`,
 if not passed as a kwarg, and so leveraging `CharField`'s auto-adding the
 validator.
 (Validating the POST data seems the best chance to error early, even if
 we're trying an INSERT...)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30776#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1c07d602528ee8804fe56bf4a0806099%40djangoproject.com.

Reply via email to