@carecard/validate-ts 2.2.11 → 2.2.12
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Validate the property values format.
|
|
2
|
-
import { isEmailString, isPhoneNumber, isUrlSafeString, isValidUuidString, isSimplePasswordString, isPasswordString, isString6To16CharacterLong, isNameString, isSafeSearchString, isCharactersString, isValidIntegerString, isValidJsonString, isImageUrl, isValidDomainName, isValidTimestampzString, isValidTimestampString, } from './validate';
|
|
2
|
+
import { isEmailString, isPhoneNumber, isUrlSafeString, isValidUuidString, isSimplePasswordString, isPasswordString, isString6To16CharacterLong, isNameString, isSafeSearchString, isCharactersString, isValidIntegerString, isValidJsonString, isImageUrl, isValidDomainName, isValidTimestampzString, isValidTimestampString, isBoolValue, } from './validate';
|
|
3
3
|
export function validateProperties(obj = {}) {
|
|
4
4
|
const returnObj = {};
|
|
5
5
|
for (const [key, value] of Object.entries(obj || {})) {
|
|
@@ -137,6 +137,11 @@ export function validateProperties(obj = {}) {
|
|
|
137
137
|
returnObj[key] = value;
|
|
138
138
|
}
|
|
139
139
|
break;
|
|
140
|
+
case 'active':
|
|
141
|
+
if (isBoolValue(value)) {
|
|
142
|
+
returnObj[key] = value;
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
140
145
|
}
|
|
141
146
|
}
|
|
142
147
|
return returnObj;
|