Opened 15 years ago

Closed 15 years ago

#5871 closed (fixed)

Allow error_messages to be specified for form types in

Reported by: smn Owned by: nobody
Component: contrib.localflavor Version: dev
Severity: Keywords: nl error_messages
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The current implementation ignores the values in self.error_messages, patch & tests included in attached diff.

Attachments (2) (3.3 KB) - added by smn 15 years ago.
diff with changes in code & test
localflavor.error_messages.patch (54.5 KB) - added by Jan Rademaker <j.rademaker@…> 15 years ago.

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by smn

diff with changes in code & test

comment:1 Changed 15 years ago by Simon G <dev@…>

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 15 years ago by Malcolm Tredinnick

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Don't require the user of a field to always have to specify an error message, when there is usually a perfectly good default available. In other words, put back the default error messages and just leave the change that allows overriding. You don't want to make the most common use-case harder just to favour customisation.

Changed 15 years ago by Jan Rademaker <j.rademaker@…>

comment:3 Changed 15 years ago by Jan Rademaker <j.rademaker@…>

Patch needs improvement: unset

I've moved all the hardcoded error messages in the localflavor module (not just the Dutch) to the Field's default_error_messages attribute.

comment:4 Changed 15 years ago by Chris Beaven

Triage Stage: AcceptedReady for checkin

Nice. Good job, Jan!

comment:5 Changed 15 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [6926]) Fixed #5871 -- Factored out the validation errors in localflavor form fields. Brings them into line with the standard newforms fields. Patch from Jan Rademaker.

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