diff --git a/server/utils/validation/signUpSchema.js b/server/utils/validation/signUpSchema.js new file mode 100644 index 0000000..3cc9675 --- /dev/null +++ b/server/utils/validation/signUpSchema.js @@ -0,0 +1,9 @@ +const joi = require('joi'); + +module.exports = joi.object({ + name:joi.string().required(), + email: joi.string().email().required(), + password: joi.string().min(5).required(), + //like +911234567890 + phone: joi.string().pattern(/^\+[0-9]{2}[0-9]{9}$/).required(), +})