ingeni-validation 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,7 +80,18 @@ const optionMissingFields = optionalFields.filter(
80
80
 
81
81
  }
82
82
 
83
-
83
+ //Check Boolean Parameters
84
+ async function checkBooleanParams(...params) {
85
+ for (let param of params) {
86
+ if (param === "true" || param === "false") {
87
+ return false;
88
+ }
89
+ }
90
+ return true;
91
+ }
92
+
93
+
94
+
84
95
  async function isValidMobile(mobile) {
85
96
 
86
97
  const mobileStr = String(mobile).trim();
@@ -131,4 +142,4 @@ async function isValidPin(pinCode) {
131
142
  return /^[0-9]{6}$/.test(pinCodeStr);
132
143
  }
133
144
 
134
- export {validateMandate,validateOptional, isValidMobile, isValidEmail, isValidOtp, isValidPin,isValidNumber,isValidBoolean};
145
+ export {validateMandate,validateOptional, isValidMobile, isValidEmail, isValidOtp, isValidPin,isValidNumber,isValidBoolean,checkBooleanParams};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeni-validation",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Ingeni Validation",
5
5
  "license": "ISC",
6
6
  "author": "",