{"repo":"Meteor-Community-Packages/meteor-collection2","free":true,"listed":false,"github":"https://github.com/Meteor-Community-Packages/meteor-collection2","clone":"git clone https://github.com/Meteor-Community-Packages/meteor-collection2.git","description":"A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.","language":"JavaScript","stars":1016,"topics":["hacktoberfest","meteor","schema","mongodb","meteorjs","collection","database","mongo","validation"],"license":"MIT","category":"databases-storage","readme_excerpt":"Collection2 (aldeed:collection2 Meteor package) A Meteor package that allows you to attach a schema to a Mongo.Collection. Automatically validates against that schema when inserting and updating from client or server code. Since version 4.2, this package can validate with aldeed:simple-schema, Zod, or AJV-style JSON schemas. SimpleSchema remains the compatibility path for existing apps. TOC - Installation - 4.2+ - 4.0 and 4.1 - 3.x - Import using static imports - Import using dynamic imports - Why Use Collection2 - Attaching a Schema to a Collection - Attaching Multiple Schemas to the Same Collection - attachSchema options - transform - replace - Attach a Schema to Meteor.users - Schema Format - Passing Options - Validation Contexts - Validating Without Inserting or Updating - Inserting or Updating Without Validating - Inserting or Updating Without Cleaning - Skip removing properties that are not in the schema - Skip conversion of values to match what schema expects - Skip removing empty strings - Skip generating automatic values - Pick or omit from the attached schema - Inserting or Updating Bypassing Collection2 Entirely - Additional SimpleSchema Options - index and unique - denyInsert and denyUpdate - autoValue - custom - What Happens When The Document Is Invalid? - More Details - Community Add-On Packages - Automatic Migrations - Problems - SubObjects and Arrays of Objects - Disable displaying collection name in error message - Contributors - Major Code Contributors Insta","default_branch":null,"files":null,"tree":[],"storefront":"/r/Meteor-Community-Packages","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Meteor-Community-Packages/meteor-collection2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}