Skip to content
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

Fix conflict between parent validation and function validation #441

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

rpaul-stripe
Copy link
Contributor

@rpaul-stripe rpaul-stripe commented Aug 24, 2023

Due to splatting ...config after populating the validation property in validator.ts, the parents array would be overwritten whenever the user had a validation property in their top-level config — notably, when function validation is enabled. This PR fixes that issue and makes parent validation work as expected when function validation is turned on. It also adds a test case to explicitly check that this works.

The PR also adds support for setting render: false on a slot. Previously, the render attribute for a slot could only be used to change the prop name where the slot appears in the render tree. But there are cases where it's desirable to not have the slot render and be able to manually determine how to handle it in a transform function. I made a one-line change to make render: false work, consistent with how the render property works on regular tag attributes. I also added a marktest case for it.

Also increments the version number in package.json so that I can push a new release after these fixes land.

@rpaul-stripe rpaul-stripe merged commit 1d4515a into main Aug 24, 2023
2 checks passed
@rpaul-stripe rpaul-stripe deleted the array-validation-fix branch August 24, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants