Opened 6 years ago

Last modified 6 years ago

#30162 closed Bug

Model error_message 'required' gets overwritten by default_error_message — at Initial Version

Reported by: Oskar Haller Owned by: nobody
Component: Forms Version: 2.1
Severity: Normal Keywords: custom model error_messages overwritten
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top