Closed larsmbm closed 1 year ago
I have investigated the issue and created a patch file that seems to address the bug. The changes in the patch file fix the problem where the red triangle icon persists even after correcting the postcode to a valid value.
Below is the content of the patch file:
--- a/vendor/postcode-nl/api-magento2-module/view/frontend/web/js/form/components/address-autofill-nl.js 2023-08-01 13:51:52.487122881 +0000
+++ b/vendor/postcode-nl/api-magento2-module/view/frontend/web/js/form/components/address-autofill-nl.js 2023-08-01 13:51:52.484122881 +0000
@@ -136,6 +136,10 @@
return this.childHouseNumber().error($t('Address not found.'));
}
+ if (this.status() === 'valid') {
+ this.childHouseNumber().error(false);
+ }
+
this.address(response[0].address);
if (this.status() === 'houseNumberAdditionIncorrect') {
I have tested this solution in our local environment, and it appears to resolve the issue. However, I encourage the development team to review and test it thoroughly to ensure compatibility and effectiveness.
Feel free to reach out if you have any questions or need further clarification regarding this proposed solution.
This is a well written bug report, thank you.
Issue description: When entering an incorrect postcode and house number combination, an error message appears in the house number field in the form of a red triangle icon.
Expected behavior: After correcting the postcode to a valid value, the red triangle icon should disappear from the house number field.
Steps to reproduce:
Enter the following details:
Postcode: 9430 ak House number: 14 Then, modify the details to the following:
Postcode: 9403 ah House number: 14 Expected outcome: Upon changing the postcode to a valid value (9403 ah), the red triangle icon should disappear from the house number field.
Actual outcome: The red triangle icon persists in the house number field even after correcting the postcode.
This issue hinders the user experience as it indicates an error when, in fact, the provided postcode is valid. As a result, users might assume their input is incorrect, leading to confusion.