Questions tagged [simple-schema]

A simple, reactive schema validation package for Meteor. It's used by the Collection2 and AutoForm packages, but you can use it by itself, too.

258 questions
0
votes
0 answers

how to call `this.unset()` in meteor simple schema

I am using autoValue to make a doc field value available conditionally by calling this.unset() as mentioned in the doc simple schema but the field value is still showing in collection , is there any thing wrong in the following code. 'checking':{ …
Sai Ram
  • 4,196
  • 4
  • 26
  • 39
0
votes
1 answer

show limit fields on autoForm

I have this schema: AdsSchema = new SimpleSchema({ title: { type: String, label: "Title" }, _cityId: { type: String, label: "City ID" }, _categoryId: { type: String, label: "Category ID" }, insertedDateTime: { …
Roohollah
  • 69
  • 7
0
votes
1 answer

Error trying to update document using autoForm with Schema in Meteor

Error message: "Uncaught Error: After filtering out keys not in the schema, your modifier is now empty" Using autoform with collection2 and simple schema in Meteor. The schema: Injuries = new Mongo.Collection('injuries'); Rehab = new…
0
votes
1 answer

Collection undefined when trying to create a relationship

I'm trying to create a very basic relationship in Meteor using aldeed:collection2. I have two collections; Blogs and Posts. Each post should belong to one blog, so I've added blog of type Blogs to my Posts schema. Blogs = new…
Gregor Menih
  • 5,036
  • 14
  • 44
  • 66
0
votes
1 answer

Meteor / aldeed:simple-schema - RegexProblem

I'm using meteor on a project where aldeed:simple-schema is used to validate inputs. My schema looks like this: const name = { type: 'String', regEx: /^[\w\d]+$/, optional: false }; const nationalId = { type: 'String', regEx:…
Hans
  • 2,800
  • 3
  • 28
  • 40
0
votes
2 answers

Using Meteor.ObjectID as a type in SimpleSchema

I have two Schemas using SimpleSchema - say Schema1 and Schema2. I want to reference the internal ObjectId (_id) from Schema1 in Schema2. How do I go about doing this? Schema1 looks like this: Schema1 = new SimpleSchema({ aitem: { type:…
Shamar Kellman
  • 311
  • 4
  • 8
0
votes
1 answer

Meteor datepicker month and year only

I'm currently using aldeed:autoform-bs-datepicker and rajit:bootstrap3-datepicker. I would like to limit the date range to year and month. I've tried this in the helpers but it doesn't work. Any thoughts? Template.user.helpers({ datePicker:…
bp123
  • 3,217
  • 8
  • 35
  • 74
0
votes
1 answer

Autoform and FlowRouter with template level subscriptions within Meteor.js

I can't seem to work out how to create a working Autoform "QuickForm" while using FlowRouter. I keep getting this error: Exception in template helper: Error: Footer is not in the window scope This is my Quickform. In this case collection equals a…
Jammer
  • 1,548
  • 20
  • 37
0
votes
1 answer

How to get a collections attached schema with Meteors aldeed:simpleschema and mdg:validated-method

I want to created an automatically validated method like the one here but using a schema already defined and attached to a collection. To this end is there a way to extract a collections attached schema, something like: validate:…
JD.
  • 2,361
  • 6
  • 25
  • 38
0
votes
1 answer

Store a function in MongoDB in Meteor

Is it possible to store a function in a MongoDB collection in Meteor? I have tried defining my schema with const SchemaName = new SimpleSchema({ text: { type: String, }, transform: { type: Function, …
Jamgreen
  • 10,329
  • 29
  • 113
  • 224
0
votes
2 answers

Passing data between two collections - Meteor JS

Example I have two collections, one for Posts and one for Labels that look like this: Post { "_id": "WZTEGgknysdfXcQBi", "title": "ASD", "labels": {}, "author": "TMviRL8otm3ZsddSt", "createdAt": "2016-01-14T08:42:42.343Z", "date":…
0
votes
1 answer

Updates of user profile do not work once simple-schema is attached

I've been trying to create a userProfile by attaching additional information to Meteor.users using the following packages: aldeed:simple-schema aldeed:Collection2 aldeed:AutoForm The update form generates and populates with the registered email…
bp123
  • 3,217
  • 8
  • 35
  • 74
0
votes
1 answer

How to modify an already constructed schema

I'm using a third party package that defines a schema like this: People.schema = new SimpleSchema({ firstName: { type: String, optional: false } //Many other fields defined... }); I would like to modify it to have optional: true for…
zenev
  • 13
  • 5
0
votes
2 answers

autoform won't render select option field

I have an issue regarding collection2 with relationships and autoform. I try to implement an 1:n relationship, where each object has exactly 1 objectType, while to each objectType multiple objects can be referred to. My schema looks as follows: //…
Ronin
  • 7,322
  • 6
  • 36
  • 54
0
votes
1 answer

Why the elements in Array field are empty? It's about Simple-Schema usage in MeteorJs

What got me confused is described bellow. I defined a schema named SomeSchema. SomeSchema=new SimpleSchema({ content:{ type:[Object] } }); Then I defined a collection named Some, and attach this collection to SomeSchema. Some=new…
Singhi John
  • 307
  • 2
  • 10