-
-
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
Allowing custom properties #44
Comments
Good question. A few points:
You can keep this open as a reminder to make these changes. |
Also the |
Thanks for letting me know! I'll have a closer look at the source code then. |
I have hit on a requirement that in fact seems very related to this. Here's a discusson thread that's related, and below is a simplified example of what I'd like available:
As you can see, I'd like the ability to override or add to the properties of another schema that's included into this one. |
Yep, we'd just need to _.extend the individual field definitions rather than the schema object as a whole. It's actually related to Meteor-Community-Packages/meteor-collection2#44. |
Hmm, apart from the users collection enhancement, I don't see a specific reason to do this on collection2. I feel, keeping this on simple-schema on the other hand, would also empower those who don't use collection2. Also contextually speaking, I believe rules about schema validation should reside in the schema object, rather than the collection object. |
Agreed, it would be done on SS, but used by C2 for Meteor.users. I might do the development later today since it should be relatively easy. |
|
@serkandurusoy, you should now be able to merge/extend schema fields in the way you describe. @matteodem, take a look at Custom Validation. This should address your original issue (and more!). |
Great, thanks. I'll dive right in. |
What do you think of allowing custom properties to let other packages have the possibility to enhance the Simple Schema with additional information? As an example:
I'd also be okay with only one property called "custom" or something where one can define such informations.
The text was updated successfully, but these errors were encountered: