Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12017 closed (fixed)

UKPostcodeField doesn't shows provided custom "error_messages"

Reported by: Vladimir Magamedov Owned by:
Component: contrib.localflavor Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Here we have:

if not self.postcode_regex.search(postcode):
    raise ValidationError(self.default_error_messages['invalid'])

But should be:

if not self.postcode_regex.search(postcode):
    raise ValidationError(self.error_messages['invalid'])

Change History (5)

comment:1 Changed 7 years ago by Vladimir Magamedov

milestone: 1.2
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Version: 1.1SVN

comment:2 Changed 7 years ago by Jacob

Owner: Jacob deleted

comment:3 Changed 7 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12044]) Fixed #12017 - Overriding the default error message of the UKPostcodeField works again.

comment:4 Changed 7 years ago by Jannis Leidel

(In [12250]) [1.1.X] Fixed #12017 - Overriding the default error message of the UKPostcodeField works again. Backport of r12044 and r12249.

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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