add filter for number

This commit is contained in:
Swift
2024-02-25 14:02:37 +03:30
parent f5592f3d3b
commit a9cb1653f4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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),
+1 -1
View File
@@ -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),