The BRPostalCodeValidator was using _('Invalid Postal Code') as an error code. But error codes should be in snakecase and not translatable.
With this change the error code used is the default one (invalid).
Please replace these instructions with a description of your change. The
'New Fields Only' section should be removed if your pull request
doesn't add any new fields.
Thanks for your contribution!
A checklist is included below which helps us keep the code contributions
consistent and helps speed up the review process. You can add additional
commits to your pull request if you haven't met all of these points on your
first version.
All Changes
[x] Add an entry to the docs/changelog.rst describing the change.
[x] Add an entry for your name in the docs/authors.rst file if it's not
already there.
Questions:
Shouldn't BRZipCodeField be renamed to BRPostalCodeField to be more consistent? (BRZipCodeField is the only BR field that has Zip in it, all other use Postal)
Should I delete the translations that my change makes unnecessary?
Changes:
The
BRPostalCodeValidator
was using_('Invalid Postal Code')
as an error code. But error codes should be in snakecase and not translatable. With this change the error code used is the default one (invalid
).Please replace these instructions with a description of your change. The 'New Fields Only' section should be removed if your pull request doesn't add any new fields.
Thanks for your contribution!
A checklist is included below which helps us keep the code contributions consistent and helps speed up the review process. You can add additional commits to your pull request if you haven't met all of these points on your first version.
All Changes
[x] Add an entry to the docs/changelog.rst describing the change.
[x] Add an entry for your name in the docs/authors.rst file if it's not already there.
Questions:
BRZipCodeField
be renamed toBRPostalCodeField
to be more consistent? (BRZipCodeField
is the only BR field that hasZip
in it, all other usePostal
)