From 0bbcb36122414067cb498d1ea57414f9a7d890f2 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 22:05:34 +0300 Subject: [PATCH] sign up schema #11 --- server/utils/validation/signUpSchema.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 server/utils/validation/signUpSchema.js 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(), +})