Add/Remove mark when region/zip is required #2149
Merged
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.
Description
This PR fix display and validation when region/zip are required, for Customers addresses in backend.
Manual testing scenarios
In System / Configuration / General, set Allow Countries to USA, France, Ireland ; and remove France for State is required for.
Go to Customers, open any customer or add a new customer, then go to Addresses tab and add a new address.
Go to Sales, open any order, and try to edit Shipping or Billing address.
If you set country to usa, if you try to save the customer:
That's the truth.
Now if you set country to Ireland, if you try to save the customer:
That's wrong.
Now if you set country to France, if you try to save the customer:
That's the truth.
Apply the PR and try again.
Contribution checklist