diff --git a/server/controllers/complaintController.js b/server/controllers/complaintController.js index 281dc3c..00b5034 100644 --- a/server/controllers/complaintController.js +++ b/server/controllers/complaintController.js @@ -11,7 +11,7 @@ module.exports.create = [ [ body('fullName').notEmpty().withMessage(_faSr.required.name), body('national').notEmpty().withMessage(_faSr.required.national_code), - body('phoneNumber').notEmpty().isMobilePhone().withMessage(_faSr.required.phone_number), + body('phoneNumber').notEmpty().isMobilePhone('ir-IR').withMessage(_faSr.required.phone_number), body('email').notEmpty().isEmail().withMessage(_faSr.required.email), body('receptionCode').notEmpty().withMessage(_faSr.required.field), body('caption').notEmpty().withMessage(_faSr.required.caption), diff --git a/server/controllers/surveyController.js b/server/controllers/surveyController.js index b45202a..988934f 100644 --- a/server/controllers/surveyController.js +++ b/server/controllers/surveyController.js @@ -45,7 +45,7 @@ module.exports.createPublic = [ [ body('fullName').notEmpty().withMessage(_faSr.required.name), body('national').notEmpty().withMessage(_faSr.required.national_code), - body('phoneNumber').notEmpty().isMobilePhone().withMessage(_faSr.required.phone_number), + body('phoneNumber').notEmpty().isMobilePhone('ir-IR').withMessage(_faSr.required.phone_number), body('email').notEmpty().isEmail().withMessage(_faSr.required.email), ], checkValidations(validationResult),