Opened 9 years ago

Closed 8 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: master
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: UI/UX:


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

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

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by smn

diff with changes in code & test

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by mtredinnick

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

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 8 years ago by Jan Rademaker <j.rademaker@…>

comment:3 Changed 8 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 8 years ago by SmileyChris

  • Triage Stage changed from Accepted to Ready for checkin

Nice. Good job, Jan!

comment:5 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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