add filter for number
This commit is contained in:
@@ -11,7 +11,7 @@ module.exports.create = [
|
|||||||
[
|
[
|
||||||
body('fullName').notEmpty().withMessage(_faSr.required.name),
|
body('fullName').notEmpty().withMessage(_faSr.required.name),
|
||||||
body('national').notEmpty().withMessage(_faSr.required.national_code),
|
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('email').notEmpty().isEmail().withMessage(_faSr.required.email),
|
||||||
body('receptionCode').notEmpty().withMessage(_faSr.required.field),
|
body('receptionCode').notEmpty().withMessage(_faSr.required.field),
|
||||||
body('caption').notEmpty().withMessage(_faSr.required.caption),
|
body('caption').notEmpty().withMessage(_faSr.required.caption),
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ module.exports.createPublic = [
|
|||||||
[
|
[
|
||||||
body('fullName').notEmpty().withMessage(_faSr.required.name),
|
body('fullName').notEmpty().withMessage(_faSr.required.name),
|
||||||
body('national').notEmpty().withMessage(_faSr.required.national_code),
|
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('email').notEmpty().isEmail().withMessage(_faSr.required.email),
|
||||||
],
|
],
|
||||||
checkValidations(validationResult),
|
checkValidations(validationResult),
|
||||||
|
|||||||
Reference in New Issue
Block a user