Kalam Azad 2024-03-12 13:59:40 +08:00
parent b661e5511f
commit 9c1e71640e
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ const bodyValidation=(schema,body)=>{
exports.checkKeyMatch=(arr1, arr2,section="Body")=> {
// Iterate over each object in arr1
var errors=[]
if(arr1){
for (let obj1 of arr1) {
if (obj1.required) {
let key = obj1.itemName.toLowerCase()
@ -46,6 +47,7 @@ exports.checkKeyMatch=(arr1, arr2,section="Body")=> {
}
}
}
}
return errors; //
}