ItemReceptionTransNumber
This commit is contained in:
Swift
2024-02-27 13:36:03 +03:30
parent c46a178341
commit a00fe63699
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports.create = [
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).custom(async(value, { req }) => {
const check = await Transaction.findOne({ItemReceptionTransDate:value})
const check = await Transaction.findOne({ItemReceptionTransNumber:value})
if(!check){
return Promise.reject(new Error("کد پذیرش معتبر نیست"))
}else{