hi, i tried add custom profile scheme to my users, but while i create account i have error: Email is required
why?
my scheme:
Schema = {};
Schema.UserProfile = new SimpleSchema({
name: {
type: String
},
birthday: {
type: Date
},
gender: {
type: String,
allowedValues: ['Male', 'Female']
},
});
Schema.User = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id
},
email: {
type: String,
regEx: SimpleSchema.RegEx.Email
},
createdAt: {
type: Date
},
profile: {
type: Schema.UserProfile,
},
services: {
type: Object,
optional: true,
blackbox: true
}
});
Meteor.users.attachSchema(Schema.User);
also i tried replace profile to
type: Object,
optional: true,
blackbox: true
but it dosnt help