Opened 17 years ago

Closed 17 years ago

#5871 closed (fixed)

Allow error_messages to be specified for form types in localflavor.nl.forms

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

Description

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

Attachments (2)

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

Download all attachments as: .zip

Change History (7)

by smn, 17 years ago

diff with changes in code & test

comment:1 by Simon G <dev@…>, 17 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 17 years ago

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.

by Jan Rademaker <j.rademaker@…>, 17 years ago

comment:3 by Jan Rademaker <j.rademaker@…>, 17 years ago

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 by Chris Beaven, 17 years ago

Triage Stage: AcceptedReady for checkin

Nice. Good job, Jan!

comment:5 by Malcolm Tredinnick, 17 years ago

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