Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user_schema = new app.db.schema(
- username: String
- email: String
- password: String
- account:
- plan:
- type: String
- default: "Free"
- enum: ["Free", "Bronze", "Silver", "Gold"]
- comments: [
- title: String
- message: String
- date_added: Date
- ]
- )
- user_schema.path("email").validate((value, respond)->
- respond v.check(value).isEmail()
- , "Invalid email address")
- comments: [
- title:
- type: String
- required: true
- message:
- type: String
- required: true
- date_added: Date
- ]
Add Comment
Please, Sign In to add comment