Opened 17 years ago

Closed 13 years ago

#6737 closed New feature (wontfix)

Add Field default_error_messages feature to Forms class

Reported by: nicklane Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: daemondazz Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I found it was useful to have the same default_error_messages dict feature that exists in Field classes, with Form classes too. This allows you to easily override the error messages shown by form validation, or change the messages by subclassing.

Attachments (1)

forms-error-messages.patch (3.4 KB ) - added by nicklane 17 years ago.

Download all attachments as: .zip

Change History (7)

by nicklane, 17 years ago

Attachment: forms-error-messages.patch added

comment:1 by nicklane, 17 years ago

Needs documentation: set
Needs tests: set

comment:2 by Jacob, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by daemondazz, 16 years ago

Cc: daemondazz added

comment:4 by Julien Phalip, 14 years ago

Type: New feature

comment:5 by Julien Phalip, 14 years ago

Severity: Normal

comment:6 by Carl Meyer, 13 years ago

Easy pickings: unset
Resolution: wontfix
Status: newclosed
UI/UX: unset

Fields use a default_error_messages dict because they are built-in Django code that raises errors, and its useful for users to have a sane way to customize those messages.

Django's built-in Form classes don't raise any errors themselves. User forms that raise errors can use whatever technique they want for allowing subclasses to easily modify their error messages; Django doesn't need to dictate a particular method.

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