-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional AddressNL component gives "required" error message #5042
Conversation
The postcode and houseNumber weren't made `required` or `optional` depending on the `required` state of the addressNL component. These fields have/had only regex validation, and no `allow_blank` or any onther "optional" ruling. This resulted in the postcode and houseNumber fields to be always required. With this change the `required` and `allow_blank` values for the postcode and houseNumber fields gets set depending on the required state of the over-arching addressNL component. This makes optional addressNL components correctly optional
When the addressNL component is optional, the postcode and houseNumber fields should also be considered optional. But, if either postcode or houseNumber is provided, both fields become required
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5042 +/- ##
=======================================
Coverage 96.67% 96.67%
=======================================
Files 765 765
Lines 26131 26140 +9
Branches 3407 3409 +2
=======================================
+ Hits 25262 25271 +9
Misses 606 606
Partials 263 263 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar approach with mine in #5022. So I guess we can close this in favor of the other one which handles everything related in one place.
We prefer dealing with the translations during the release preparation (avoiding conflicts in the PRs as well)
Yeah agreed, i'm closing this PR (and deleting the branch) Check, I'll keep that in mind |
Partly closes #4699
Changes
The
postcode
andhouseNumber
fields didn't change their 'required' state depending on the addressNL component required state. This resulted in optional addressNL components requiring a postcode and houseNumber.This PR sets the
required
andallow_blank
field values of the postcode and houseNumber fields depending on the required state of the overarching addressNL component.Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene