You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Simple-schema team,
First off, thanks for all your amazing work! I've run into a confusing situation and would appreciate some clarification. When using a string field, it seems that passing an object that contains a string (e.g., { foo: 'bar' }) still passes validation. Did I misunderstand how autoConvert works, or is this behavior a bug?
To Reproduce
Set autoConvert to true (or leave it at its default setting)
Define a field with type String
Pass an object containing a string to that field, for example:
{'stripeInvoice.invoiceUrl': {foo: 'bar'}}
Notice that the validation passes unexpectedly
Expected behavior
I expected the validation to fail when an object is provided, even if it contains a string. I understand that autoConvert performs some conversions for string fields by default when not explicitly disabled, but I assumed that objects with string values would not be automatically converted. Clarification on this behavior would be appreciated.
Screenshots
Versions (please complete the following information):
Meteor version: [2.16]
Browser: [Chrome]
Version: [1.13.1] (I know we haven't been able to upgrade to the latest version, but we will be soon)
Additional context
This is my first ever question on a GitHub repo. Please let me know if any further details are needed. Thanks again for your support! 🙏
The text was updated successfully, but these errors were encountered:
We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.
However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee your issues to be solved within certain time.
If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.
Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know
Describe the bug
Hey Simple-schema team,
First off, thanks for all your amazing work! I've run into a confusing situation and would appreciate some clarification. When using a string field, it seems that passing an object that contains a string (e.g.,
{ foo: 'bar' }
) still passes validation. Did I misunderstand howautoConvert
works, or is this behavior a bug?To Reproduce
autoConvert
totrue
(or leave it at its default setting)String
Expected behavior
I expected the validation to fail when an object is provided, even if it contains a string. I understand that
autoConvert
performs some conversions for string fields by default when not explicitly disabled, but I assumed that objects with string values would not be automatically converted. Clarification on this behavior would be appreciated.Screenshots
Versions (please complete the following information):
Additional context
This is my first ever question on a GitHub repo. Please let me know if any further details are needed. Thanks again for your support! 🙏
The text was updated successfully, but these errors were encountered: