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.
Questions tagged [simple-schema]
258 questions
2
votes
0 answers
meteor can`t include simpleSchema
first of all, I want to say that im a newbie in meteor and I been looking for a solution for 3 hours but I dont find it. I hope my question helps other newbies like me.
Im working with an Inspinia seed proyect and Im testing and learning how to use…

MaxMayoris
- 21
- 3
2
votes
1 answer
SimpleSchema: Depending values instead of optional values
This is how my SimpleSchema validation looks like:
validate: new SimpleSchema({
type: { type: String, allowedValues: ['start', 'stop'] },
_id : { type: SimpleSchema.RegEx.Id, optional: true },
item: { type: String, optional: true…

user3142695
- 15,844
- 47
- 176
- 332
2
votes
1 answer
Unable to get autoform 6.0 to populate with existing data
I've updated to simple-schema npm and installed autoform 6.0 however I seem unable to successfully generate forms for collections. I get this error Exception in template helper: TypeError: Cannot read property 'mergedSchema' of undefined and I have…

bp123
- 3,217
- 8
- 35
- 74
2
votes
0 answers
How do I trigger AutoValue?
I have two autovalue fields in my Collection. I wrote a Cronjob that loops through some of my collection items every half an hour. Basically I want to trigger/refresh the autovalues of those items without updating any other fields.
I tried using…

Cos
- 1,649
- 1
- 27
- 50
2
votes
2 answers
Form validation using Meteor/React/SimpleSchema
I'm fairly new to Meteor. I've been trying to find a way to display validation error messages to my React component but I've had no success.
This is employees.js file which resides in my imports directory
import {Mongo} from 'meteor/mongo';
import…

Andrew Zielinski
- 23
- 2
2
votes
1 answer
ReferenceError: is not defined
I'm trying to create a new collection 'profile' when Accounts.onCreateUser is run however I'm getting a ReferenceError: Profile is not defined. I assume it's a load order problem. If I move the schema file into a lib folder it works however I'm…

bp123
- 3,217
- 8
- 35
- 74
2
votes
1 answer
How to show reactive map at meteor/autoform, and get marker full adress
So i've been struggling for a week to make this happen!!!!
In short, my structure is as follows :
Address = new SimpleSchema({
location: {
type: Object
},
fullAddress: {
type: String
},
country: {
type:…

Roshdy
- 1,703
- 3
- 25
- 34
2
votes
3 answers
"label" usage in meteor simple schema
I have seen this "label" usage quite a few times in meteor simple schema. Just have no idea why do we need such a field.
const Product = new SimpleSchema({ _id: {
type: String,
label: "Product ID" } })
Thanks
Derek

derek
- 9,358
- 11
- 53
- 94
2
votes
2 answers
SimpleSchema unable to set specific error message for given validation
I have this very basic model with just one field name that I want to validtate against a regex:
const Projects = new ProjectsCollection('projects');
Projects.schema = new SimpleSchema({
_id : {type: String, regEx:…

Romeo Mihalcea
- 9,714
- 12
- 50
- 102
2
votes
1 answer
Cannot find attachSchema property on Mongo.Collection with angular2-meteor
Here is my problem :
I want to use the power of simple-schema to be able to check my inserts against the following schema :
let UprocSchema = new SimpleSchema({
"name": { type : String, label: "Nom Uproc" },
"label": { type : String, label:…

Ronald Pauffert
- 4,346
- 1
- 14
- 15
2
votes
4 answers
Meteor - check() VS new SimpleSchema() for verifying .publish() arguments
To ensure the type of the arguments my publications receive, should I use SimpleSchema or check()?
Meteor.publish('todos.inList', function(listId, limit) {
new SimpleSchema({
listId: { type: String },
limit: { type: Number }
…

Alexandre Bourlier
- 3,972
- 4
- 44
- 76
2
votes
2 answers
Meteor Mongo - upsert and $inc with aldeed simple schema - 'update failed'
I have an image gallery with a forward and backward-button. on a click on either of the buttons i want to upsert an entry in the local database with the times the image has been viewed (so i can later see which image has been viewed the most).
This…

Raggamuffin
- 699
- 1
- 6
- 19
2
votes
1 answer
Meteor js: get full validation message with validatedmethod simpleschema
I am new to Meteor js and I am trying to create a form following the official guide http://guide.meteor.com/methods.html#method-form. It suggests to use mdg:validated-method package and aldeed:simple-schema for validation which are based on…

VV01K
- 21
- 3
2
votes
2 answers
Meteor: how to automatically populate field with length of array stored in other field in a collection?
I have a collection defined with SimpleSchema/Collection2 like this:
Schema.Stuff = new SimpleSchema({
pieces: {
type: [Boolean],
},
num_pieces: {
type: Number,
},
How can I get num_pieces to automatically be…

Alveoli
- 1,202
- 17
- 29
2
votes
2 answers
Meteor - Simple Schema losing Object properties
I have a MongoCollection with a aldeed:simple-schema attached, where the content property has the type Object:
The following code writes the document to console, then inserts it, then fetches the document with the correct id and writes this to…

Hans
- 2,800
- 3
- 28
- 40