-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Problem with array validation #18
Comments
Looks like a bug. I will fix it in the devel branch, which I hope to release in a couple days. |
Sounds great! Thank you for your immediate reply! :) |
This is fixed now in the devel branch. Still some work to do before everything can be released, though. |
Thanks for fixing it! |
Hi @aldeed, after trying out the new release, I am not quite sure if the array validation is working well now, because I got a Studies.update {_id: studyId}, {$push: {'researchers': {_id: userId, role: role}}} I could not find an error in my code, so I suspect the validation to be broken, because both Any help would be greatly appreciated! :) Cheers, |
Hmm, I don't think I tested pushing an object. I'll check it out. |
Would be awesome! Thanks! :) |
I believe this should be fixed now. Let me know if you're still having problems. |
Looks very good, thank you for reacting so quickly! :) |
Hi there,
first of all, I would like to express a big Thank You to you for investing the time to create and maintain the simple-schema, collection2 and autoform packages. They are very helpful to me!
Today, however, I experienced an odd issue with array validation. My collection definition and insertion look like the following:
I am getting the following error trace in the client console:
Printing the invalid keys to the console (using
Studies.simpleSchema().invalidKeys()
), yields the following output:Adding an attribute
optional: true
to the fieldsresearchers.$._id
andresearchers.$.role
seems to suppress the error from being thrown and the fields are correctly inserted into the database. However, I would like to make them required fields. Am I missing an important detail here or is that a bug that needs to be fixed?Cheers,
Mike
The text was updated successfully, but these errors were encountered: