add countdown and some bug fixes like csv
This commit is contained in:
parent
2b1e35e55f
commit
d41551c806
18 changed files with 263 additions and 205 deletions
|
|
@ -28,16 +28,13 @@ class AllowedString extends mongoose.SchemaType {
|
|||
|
||||
const email = {
|
||||
type: String,
|
||||
trim: true,
|
||||
lowercase: true,
|
||||
unique: true,
|
||||
validate: {
|
||||
validator: function(v: string) {
|
||||
console.log(v)
|
||||
return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(v);
|
||||
},
|
||||
message: "Invalid email"
|
||||
},
|
||||
required: [true, "Email required"]
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
|
|
@ -71,7 +68,7 @@ const OrganizationVersion = {
|
|||
website: { type: String },
|
||||
address: { type: String },
|
||||
person: { type: String },
|
||||
email: { type: String },
|
||||
email,
|
||||
phone: { type: String },
|
||||
peoples: [{
|
||||
name: { type: String },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue