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
1 answer

How to validate an update against SimpleSchema before updating a document in collection

I'm trying to validate my data against a SimpleSchema before it gets submitted to the collection but for some reason I'm not able to do so with this error. Exception while invoking method 'createVendorCategory' { stack: 'TypeError: Cannot call…
BaconJuice
  • 3,739
  • 13
  • 56
  • 88
0
votes
1 answer

Narrowing down collection prior to Mongo text search

I have a collection that is a simpleschema that looks somewhat like this VendorCategories = new SimpleSchema({ name: { type: String, label: "Category" }, slug: { type: String, label: "Slug" …
BaconJuice
  • 3,739
  • 13
  • 56
  • 88
0
votes
1 answer

Meteor SimpleSchema does not throw error

I'm trying to implement checks in Meteor method, but facing some strange behavior of SimpleSchema package (i'm using latest one which is 1.3.3 at the moment); From the Docs: Call mySimpleSchema.validate(doc) to validate doc against the schema and…
0
votes
1 answer

How to configure unique key with multiple field in SimpleSchema

I'm using SimpleSchema in meteor app. Now I need to define unique key with multiple field. In a Collection I have field like servingDate, vanId, timeSlot I need to make a unique with those three fields. Is there any possibilities to do in…
Zahed
  • 73
  • 2
  • 9
0
votes
1 answer

Meteor simpleSchema prevent field updates

Is it possible to specify that a field is not updateable using the schema itself rather than defining it in an allow/deny rule? I am wondering because I use a quickform to allow users to edit their user details based on the users document (accounts…
Chris
  • 13,100
  • 23
  • 79
  • 162
0
votes
0 answers

Meteor: Multidimensional array of objects inserting null into database (SimpleSchema)

I'm trying to $set a multidimensional array of objects ("log") in Meteor on the server side. Every time I do the operation, the objects all appear as null after the update. I suspect it might be a problem with my SimpleSchema, but I can't find any…
anj
  • 51
  • 4
0
votes
1 answer

Meteor Method not defined in Template from schema

I have a meteor method defined in ClassModel.js, which is located within /server. On the client js file, I set up a template event that tries to call this function, but the function keeps throwing a ReferenceError and is undefined. Any idea…
nope
  • 1
  • 1
0
votes
0 answers

autoValue executing both on client and server in collection2

I have defined the autoValue option in my schema using meteor-simple-schema and meteor-collection2; however, since the schema definition runs on both client and server, all the code in my autoValue option is being run two times. This is inefficient.…
Jamgreen
  • 10,329
  • 29
  • 113
  • 224
0
votes
2 answers

meteor autoform custom validation message on sibling fields

How do send custom validation message to another schema field ? SessionSchema = new SimpleSchema({ 'seat.from': { type: String, max: 10, optional: false }, 'seat.to': { type: String, max: 10, optional: false …
Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67
0
votes
1 answer

Meteor server is crashing on SimpleSchema autoValue option

I'm new working with MeteorJS dev an app, this is a problem when I'm making the collection of some item in an quick inventory app. Here is the…
0
votes
1 answer

SimpleSchema and MongoDB Nested Arrays in Arrays

I am using SimpleSchema with Meteor for Structuring the Database Entries. The problem is, I have an array of arrays of objects (These data is displayed inside of an HTML table) and need to update single cells. My Schema looks like:…
Tobi
  • 1,175
  • 1
  • 19
  • 44
0
votes
1 answer

How to use AutoForm to register users and login?

I want to use AutoForm to create a register form which subsequetnly creates users. Furtehremore, new users should be signed in automatically after registering. Therefore, I created an AutoForm and supplied a meteormethod called…
user3475602
  • 1,217
  • 2
  • 21
  • 43
0
votes
2 answers

Why is this insert into a schema attached collection invalid?

Let's say, we have this schema : Schemas.MyCollection = new SimpleSchema({ something: { type: Object } }); I want to insert something into MyCollection. For example : var myobj = { aaaaaa: 11111, bbbbbb:…
dev1223
  • 1,148
  • 13
  • 28
0
votes
1 answer

Meteor Autoform/SimpleSchema - quickform (type="update") not working

I have what I thought was a simple SimpleSchema with which I currently have two templates. One contains a quickform to insert a new document into the collection, the other is also a quickform which should update the document from the first…
0
votes
1 answer

Most simple schema for managing elements and groups

I want to create a list for which I so far have this Schema: new SimpleSchema({ element: { type: String, optional: true }, note: { type: String, optional: true }, order: { type: Number, optional: true } }); But now I want…
user3142695
  • 15,844
  • 47
  • 176
  • 332
1 2 3
17
18