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: trigger validation netsted field #11336

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

sungh0lim
Copy link

@sungh0lim sungh0lim commented Dec 24, 2023

To fix #10862 .

To ensure that an empty array [] is considered a valid value and correctly triggers validation when shouldValidate is set to true, I add the condition isEmptyNonPrimitive.

I want to add tests for the cases of an empty object and an empty array in setValue.test.tsx, but I'm not sure what to compare. Can you help me with this?

Copy link

codesandbox bot commented Dec 24, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@sungh0lim sungh0lim changed the title Trigger validation netsted field fix: trigger validation netsted field Dec 24, 2023
bluebill1049
bluebill1049 previously approved these changes Jan 13, 2024
Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the contribution. Sorry I have been busy and completely miss the PR>

@bluebill1049
Copy link
Member

looks like test is failed.

@bluebill1049
Copy link
Member

thank you for your contribution! <3

@sungh0lim
Copy link
Author

@bluebill1049 Can it be merged into the main branch? It's been a long time since I was approved.

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.

issue: setValue an empty array to a nested field doesn't trigger validation when shouldValidate is true
2 participants