#30162: Model error_message 'required'  gets overwritten by 
default_error_message
-------------------------------------+-------------------------------------
               Reporter:  Oskar      |          Owner:  nobody
  Haller                             |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  2.1
  Uncategorized                      |       Keywords:  custom model
               Severity:  Normal     |  error_messages overwritten
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When creating a custom user model I tried the following.

 error_messages={'required': _('Please enter your last name.')}

 However, it get's overwritten by the default_error_message "This field is
 required."

 Unless I specify the 'required' error_message in the my form.


 This is related to this bug-report 5-years ago
 [https://code.djangoproject.com/ticket/22105] .  Is the behavior above
 still considered 'deliberate'. If so could you elaborate on it? I really
 see no explanation why this could be wanted.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30162>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.ed14b13b3685b3cf78cb1083e9ad21f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to