Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12017 closed (fixed)

UKPostcodeField doesn't shows provided custom "error_messages"

Reported by: vmagamedov 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 6 years ago by vmagamedov

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.1 to SVN

comment:2 Changed 6 years ago by jacob

  • Owner jacob deleted

comment:3 Changed 6 years ago by jezdez

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

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

comment:4 Changed 6 years ago by jezdez

(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 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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