[Shipping labels] Display remote validation errors in address form #15024
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.
Part of: #13781
⚠️ Depends on #15023 ⚠️
Description
This updates the Woo Shipping label edit address form to display validation errors from the remote endpoint.
There are two changes in the behavior:
Changes
WooShippingAddressField
to include a method to set an error message, so we can set a remote validation error on a field.WooShippingEditAddressView
to get the status label from the view model.WooShippingEditAddressViewModel
with astatusLabel
property.remoteValidationError
. If it's a field-specific error, we set the error on the corresponding field.Testing information
Screenshots
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-30.at.16.02.05.mp4
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: