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
11
votes
4 answers
Separate form validation with Meteor
I'm using collection2 and I'm trying to get it to handle validation is a specific way. I have a profile schema which looks kind of like this:
Schema.UserProfile = new SimpleSchema({
name: {
type: String,
optional: false
}
…

SeanWM
- 16,789
- 7
- 51
- 83
6
votes
2 answers
Using objects as options in Autoform
In my Stacks schema i have a dimensions property defined as such:
dimensions: {
type: [String],
autoform: {
options: function() {
return Dimensions.find().map(function(d) {
return { label: d.name, value:…

Chris
- 9,603
- 15
- 46
- 67
6
votes
1 answer
Structure role-management in meteor-app with alanning:roles
I need some advice for building a correct role schema and management in my meteor-app.
Structure
Im using alanning:roles@1.2.13 for adding role management functionallity to the app.
There are four different user-types: Admin, Editor, Expert and…

user3848987
- 1,627
- 1
- 14
- 31
6
votes
1 answer
Meteor using namedContext to addInvalidKeys to an AutoForm form returning an error
I have the following SimpleSchema where I am trying to add custom validation to validate against entering duplicate customer name, yet whenever I try to save a new customer I get error:
Exception in delivering result of invoking
…

MChan
- 6,842
- 27
- 83
- 132
5
votes
1 answer
Meteor AutoForm: How to update schema values with array of sub-documents?
I am new to Meteor AutoForm. I want to update player docs with country doc. Below is my code. If I add{{> afQuickField name="country"}} in AutoForm it doesn't works. {{> afQuickField name="name"}} alone works fine. How do I add entire country docs…

Ramesh Murugesan
- 4,727
- 7
- 42
- 67
4
votes
1 answer
How to pass a default value for a field in 'insert' form?
How to pass a default value for a field in 'insert' form?
I'm using Meteor's packages: Autoform, Collections2, and Simple-Schema.
My process is:
A User selects some value in a list on a page, then
The 'insert' from opens, and I want that one field…

Alexey Ruzin
- 967
- 8
- 17
3
votes
1 answer
Getting Error: List id must be an object after adding schema to todos example in Meteor
The todos example for Meteor works fine. However, when I added a schema to the Todos and Lists collections I keep getting "Error: List id must be an object". Any help would be greatly appreciated.
Added were:
meteor add aldeed:simple-schema
…

Mark M
- 49
- 3
3
votes
1 answer
Meteor Error: User Not Found
I have been working on extending the Meteor.users schema which work fine but after I create the first user in a Meteor.startup() and tried logging in I get a "User Not Found" error. Even though i can see the user in the mongo shell. Here is my…

jessiPP
- 436
- 1
- 6
- 21
3
votes
1 answer
Unique Field in Meteor AutoForm
I have a Meteor AutoForm collection schema with the following field and I am trying to make it unique. It doesn't allow the same value in the same case but when I change the case of the value, value get inserted, so how can I prevent to insert…

Mahendra Garg
- 516
- 1
- 9
- 27
3
votes
2 answers
Meteor using a collection.find() in another collection
I need to proceed a collection.find() in another collection. I have a collection named Orders.
Orders = new Mongo.Collection('orders')
Orders.attachSchema(new SimpleSchema({
clientId: {
type: String
},
orderDate: {
type: Date
}
});
It…

yves
- 33
- 2
3
votes
1 answer
How to add Meteor.userId() to SimpleSchema via autoValue?
Inside my libs folder I create collections using SimpleSchema. I want to add the Meteor.userId to some fields via autoValue like this:
Collection = new Meteor.Collection('collection');
Collection.attachSchema(new SimpleSchema({
createdByUser: {
…

Moritz Schmitz v. Hülst
- 3,229
- 4
- 36
- 63
3
votes
2 answers
How to pass _id to autoForm via hidden field in Meteor?
I have a collection of projects and the Meteor.users collection. My goal is to add the document _id of a project to a username.
HTML:
{{#each projectList}}
{{> projectView}}
…

Moritz Schmitz v. Hülst
- 3,229
- 4
- 36
- 63
3
votes
2 answers
How to populate autoForm select with values from collection in Meteor?
I just found this awesome autoForm package for Meteor and I want to use it together with select2.
My goal is to use the autoForm to easily create an input form for one of my collections. The obstacle is: how do I populate it with fields from another…

Moritz Schmitz v. Hülst
- 3,229
- 4
- 36
- 63
3
votes
2 answers
How to insert users username using simple schema for meteor
I'm trying to insert the logged in users username but whenever I submit the form. The collection never gets inserted. It only gets inserted if I comment out the createdBy field. I'm currently using the package User Accounts as my login/signin…

Mr.Bill
- 179
- 14
3
votes
1 answer
Validate date values in Meteor AutoForm SimpleSchema
I have the following Schema:
Dates.attachSchema(new SimpleSchema({
description: {
type: String,
label: "Description",
max: 50
},
start: {
type: Date,
autoform: {
afFieldInput: {
…

user3475602
- 1,217
- 2
- 21
- 43