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

#4181 #4553

Merged
merged 2 commits into from Nov 23, 2023
Merged

#4181 #4553

merged 2 commits into from Nov 23, 2023

Conversation

zaalbarxx
Copy link
Contributor

#4181

πŸ”Ž Overview

extended list of exposed data for Field.ts to include field's value, meta and errors, would allow for creating custom component for "grouping" fields state

πŸ€“ Code snippets/examples (if applicable)
https://stackblitz.com/edit/vue-3-veevalidate-form-validation-example-4159qg?file=src%2Fvee-validate.esm.js,src%2Fmain.js,src%2FFieldGroup.vue,package.json,src%2FField.vue,src%2FApp.vue

βœ” Issues affected
closes #4181
-->

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (3130470) 97.32% compared to head (0180150) 97.32%.

❗ Current head 0180150 differs from pull request most recent head 6502957. Consider uploading reports for the commit 6502957 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4553   +/-   ##
=======================================
  Coverage   97.32%   97.32%           
=======================================
  Files          86       86           
  Lines        6762     6770    +8     
  Branches     1253     1253           
=======================================
+ Hits         6581     6589    +8     
  Misses        181      181           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@zaalbarxx zaalbarxx mentioned this pull request Nov 21, 2023
Copy link
Owner

@logaretm logaretm left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

While I do not prefer this pattern, I no longer see the harm in having this since it is in the Vue docs.

However, you should be aware of this doc note:

refs are automatically unwrapped just like on normal instances

That means the types here are wrong, no? Because it is a direct cast instead of inferred unwrapped ref.

In your PR, this is what is suggested to access the field value:

CleanShot 2023-11-21 at 22 08 58

So it's going to be fieldRef.value.value.value.

But in practice, it gets unwrapped:

CleanShot 2023-11-21 at 22 09 32

So it's only fieldRef.value.value.

So let's get those types corrected and I will be happy to approve this.

@zaalbarxx
Copy link
Contributor Author

Should be correct now ? @logaretm

@logaretm
Copy link
Owner

All good, thank you.

@logaretm logaretm merged commit e650e31 into logaretm:main Nov 23, 2023
0 of 5 checks passed
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.

Aggregated form validation
2 participants