I would like to add a gender
field which accepts [MmFf]
and normalizes to [MF]
. Here's my schema:
var UserSchema = new Schema({
name: String
gender : { type: String, upper: true, match: /[MmFf]/ }
});
I wonder what's the sequence of execution of the SchemeString functions. If uppercase
is executed beforematch
, my match
could as well be [MF]
.
I also have similar question concerning trim
and match
.
Thanks.
--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-orm...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks for the pointer.
You received this message because you are subscribed to a topic in the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-orm/L5ztQDFbBWU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mongoose-orm...@googlegroups.com.