Introducing district and subdistrict field labels and error strings#496
Open
ananyaneogi wants to merge 3 commits into
Open
Introducing district and subdistrict field labels and error strings#496ananyaneogi wants to merge 3 commits into
ananyaneogi wants to merge 3 commits into
Conversation
5c98514 to
1247448
Compare
1247448 to
de24ab0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Add support for
districtandsubdistrictas address fields, enabling regions to collect and validate these address components. This is needed to support address formats in countries where district and subdistrict are meaningful parts of a postal address (e.g., Brazil, Philippines, Kuwait, Peru).Also cut a new minor version.
What approach did you choose and why?
districtandsubdistrictwere added following the same pattern already established by neighborhood, street_name, etc -Addressclass with reader accessors and constructor parameters.Fieldas recognized field keys.What should reviewers focus on?
Are the changes sufficient to introduce new error translations and labels to clients?
The impact of these changes
Consumers of this gem can now use district and subdistrict address fields with full label and validation message support. Existing addresses without these fields are unaffected, as both default to nil.
Testing
New tests cover:
Checklist