Questions tagged [simpl-schema]
16 questions
3
votes
3 answers
TypeError: SimpleSchema is not a constructor in Meteor 1.6 project
I am creating a SimpleSchema for my staff collection in Meteor and I am getting error "TypeError: SimpleSchema is not a constructor" in my server console. I've gone through the SimpleSchema documentation and this constructor is there, my code is…

amyst
- 616
- 1
- 10
- 22
2
votes
1 answer
Meteor - simpl-schema type boolean, accept "Yes" has true and "No" has false
I’ve created a Schema in an external file with all the mandatory and optional fields and on my client.js I have an array with the XLSX fields that were inputed by the user.
My objective is to validade my array against my schema, output an error if…

Pedro Martins
- 219
- 1
- 10
1
vote
2 answers
simpl-schema: How to create an schema that validates every property of an object is of a certain schema?
Basically... I have something of the following type: record (aka Map). Basically, an object that can have any field, as long as it is an user.
How do I create an Schema that validates that?

caeus
- 3,084
- 1
- 22
- 36
1
vote
0 answers
Meteor: Use value from an autoValue field to compute for value in another autoValue field
Meteor v 1.10.1.
I am using meteor-collection2@3.0.6 and using simpl-schema v1.5.7 (NPM package)
I have this schema:
import SimpleSchema from "simpl-schema";
Orders.schema = new SimpleSchema ({
name: {
type: String
},
items: {
type:…

dejibimbola
- 11
- 2
1
vote
1 answer
iron meteor cannot find simpl-schema
I am using iron-meteor for scaffolding meteor crud apps and I am following this tutorial. I have iron meteor running but the problem arises when I install aldeed collections and other packages as follows;
iron add twbs:bootstrap aldeed:collection2…

Phemelo Khetho
- 231
- 1
- 4
- 14
1
vote
0 answers
What causes the SimpleSchema is not a constructor error at collections.js
When using simpl-schema I am getting the following error:
SimpleSchema is not a constructor
I have already added
aldeed:autoform
aldeed:collection2@3.0.0
"simpl-schema": "^1.4.3"
My code:
import { Mongo } from 'meteor/mongo';
import …

Nimmi Verma
- 465
- 6
- 11
1
vote
1 answer
Exception in template helper: TypeError: Cannot read property 'mergedSchema' of undefined
I am new in meteor. I am using simple schema for quickForm and got this error.
Exception in template helper: TypeError: Cannot read property 'mergedSchema' of undefined
main.html
You've…

Nimmi Verma
- 465
- 6
- 11
1
vote
1 answer
SimpleSchema custom error messages in autoform 6.2.0 not working
I followed Start Date to be Greater than End Date link. Below is the SimpleSchema code.
import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';
import MessageBox from…

Ankur Soni
- 5,725
- 5
- 50
- 81
0
votes
0 answers
simpl-schema to validate multiple types of data
Is it possible to use the simple schema package to validate data that can potentially be multiple types.
For example, if we have an object, and are checking to see if it's an admin by both checking a unique name is apart of the admins, and if…

fly_sprig117
- 25
- 7
0
votes
0 answers
simpl-schema auto generate _id for subdocuments
I have a schema for a subdocument as follows
const childSchema = new SimpleSchema({
_id: {
type: String,
autoValue: () => this.docId,
},
name: String,
members: {
type: Array,
optional: true,
},
'members.$':…

Viswajith Kalavapudi
- 189
- 1
- 3
- 16
0
votes
0 answers
simpl-schema import fails while assigning to an object variable
I have two files with schemas, that i want to assign to a variable in a third schema file as depicted below
abcCollection.js
import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';
const abcCollection = new…

Viswajith Kalavapudi
- 189
- 1
- 3
- 16
0
votes
1 answer
How to pass schema type: Object's key rules
I am trying to understand how to validate, an object using Meteor-Collection2. I can better explain in the code below:
// This is the object structure to validate
// const obj = {
// name: 'Test',
// active: true,
// }
Test.schemaObj = {
…

IBeACoder
- 111
- 7
0
votes
1 answer
How to add a class name to an input on a SimpleSchema AutoForm in react?
I want to add a class name for an individual input, but I could not find anything on the docs about a class name property for simpl-schema or uniforms-bridge-simple-schema-2.
import { AutoForm } from "uniforms-antd";
import SimpleSchemaBridge from…

Ioana
- 23
- 5
0
votes
0 answers
simpl-schema not working with autoform using meteor flow-db-admin
Currently using meteor flow-db-admin as admin template https://github.com/sachinbhutani/flow-db-admin
But the autoform doesn't seem to work with the simpl-schema as the labels don't show and the validation doesn't work
package.json
{
"name":…

Orion
- 125
- 11
0
votes
0 answers
Getting Cannot read property 'Email' of undefined using meteor and simple-schema
How can I get Email property using simpl-schema? I'm getting undefined message when using calling Email property. Not sure if anything changed because the implementation is according to the docs.
import { Meteor } from "meteor/meteor";
import…

Israel Z Kollie
- 273
- 5
- 17