@carecard/validate 3.9.0 → 3.10.0
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.
- package/.agents/skills/carecard-workspace-standards/SKILL.md +4 -2
- package/.agents/skills/github-pr-create-update/SKILL.md +2 -0
- package/.agents/skills/github-pr-merge-cleanup/SKILL.md +2 -0
- package/.agents/skills/logged-in-user-profile-page/SKILL.md +2 -0
- package/.agents/skills/pkg-publish/SKILL.md +2 -0
- package/.agents/skills/pkg-validate-validation-library/SKILL.md +2 -0
- package/.agents/skills/software-design-patterns-and-clean-code/SKILL.md +2 -0
- package/.codex/AGENTS.md +5 -3
- package/.github/workflows/ci.yml +12 -34
- package/.husky/pre-commit +6 -1
- package/lib/validateProperties.js +0 -2
- package/package.json +2 -2
- package/readme.md +26 -24
|
@@ -7,6 +7,8 @@ description: 'Follow the shared SO_CareCardCa/CareCard workspace coding, testing
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Purpose
|
|
@@ -212,7 +214,7 @@ build artifacts, logs, or `.DS_Store`.
|
|
|
212
214
|
|
|
213
215
|
Most JavaScript `ms-*` services use CommonJS, Mocha, Supertest, Docker Compose
|
|
214
216
|
database tests, `@carecard/*` packages, and `sub-apps`
|
|
215
|
-
controller/router/model patterns. TypeScript services such as `ms-
|
|
217
|
+
controller/router/model patterns. TypeScript services such as `ms-messages`
|
|
216
218
|
and `ms-template-ts` use Jest or TypeScript tooling and should keep their
|
|
217
219
|
existing TypeScript style.
|
|
218
220
|
|
|
@@ -311,7 +313,7 @@ existing TypeScript style.
|
|
|
311
313
|
|
|
312
314
|
`app-dashboard` is a Next.js App Router TypeScript app using MUI, React Query,
|
|
313
315
|
`next-intl`, and shared CareCard utilities. It consumes `ms-auth`,
|
|
314
|
-
`ms-institutions`, `ms-
|
|
316
|
+
`ms-institutions`, `ms-messages`, and `ms-user-profiles` through service
|
|
315
317
|
modules.
|
|
316
318
|
|
|
317
319
|
- Keep backend URL definitions centralized in `src/services/api.routes.ts`.
|
|
@@ -7,6 +7,8 @@ description: 'Use only when the user explicitly asks for remote Git or GitHub PR
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Purpose
|
|
@@ -7,6 +7,8 @@ description: 'Use only when the user explicitly asks for remote Git or GitHub PR
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Purpose
|
|
@@ -7,6 +7,8 @@ description: 'Use when changing shared validation behavior for app-dashboard log
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Scope
|
|
@@ -7,6 +7,8 @@ description: 'Use when any pkg-* repository has non-Markdown package changes, in
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Trigger
|
|
@@ -7,6 +7,8 @@ description: 'Use when changing pkg-validate validators, sanitizers, whitelist b
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Purpose
|
|
@@ -7,6 +7,8 @@ description: 'Use every time before coding, refactoring, debugging, or reviewing
|
|
|
7
7
|
|
|
8
8
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
9
9
|
|
|
10
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
11
|
+
|
|
10
12
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
11
13
|
|
|
12
14
|
## Purpose
|
package/.codex/AGENTS.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
4
4
|
|
|
5
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
6
|
+
|
|
5
7
|
These instructions apply to the `pkg-validate` repository. This file is self-contained:
|
|
6
8
|
it includes the workspace-level instructions that were previously read from
|
|
7
9
|
`/Users/pankajpriscilla/SO_CareCardCa/.codex/AGENTS.md`, followed by
|
|
@@ -41,7 +43,7 @@ These instructions apply to the whole workspace. The workspace is a collection o
|
|
|
41
43
|
|
|
42
44
|
### Repo Workflow
|
|
43
45
|
|
|
44
|
-
- Work from the specific project directory you are changing, such as `api-auth`, `api-
|
|
46
|
+
- Work from the specific project directory you are changing, such as `api-auth`, `api-messages`, `api-institutions`, `pkg-common-util`, or `app-dashboard`.
|
|
45
47
|
- Check local status inside the affected project before editing. These directories are independent Git repositories.
|
|
46
48
|
- Do not revert or overwrite changes you did not make.
|
|
47
49
|
- Before finishing a code change, run the relevant tests and lint/format checks for the affected project.
|
|
@@ -53,7 +55,7 @@ These instructions apply to the whole workspace. The workspace is a collection o
|
|
|
53
55
|
|
|
54
56
|
### Backend Microservices
|
|
55
57
|
|
|
56
|
-
The `api-*` directories are independent Express/Postgres backend services. Most JavaScript services use CommonJS, Mocha, Supertest, Docker Compose database tests, `@carecard/*` packages, and `sub-apps` controller/router/model patterns. TypeScript services such as `api-
|
|
58
|
+
The `api-*` directories are independent Express/Postgres backend services. Most JavaScript services use CommonJS, Mocha, Supertest, Docker Compose database tests, `@carecard/*` packages, and `sub-apps` controller/router/model patterns. TypeScript services such as `api-messages` and `api-template-ts` use Jest or TypeScript tooling and should keep their existing TS style.
|
|
57
59
|
|
|
58
60
|
- Keep service-specific controllers thin. Controllers should read as a clear workflow: parse input, authorize, validate, call domain/model logic, build response, and pass errors to `next`.
|
|
59
61
|
- Extract multiline chunks into descriptively named functions in the appropriate `controllerLib`, `commonLib`, `sub-apps/lib`, model helper, or shared `pkg-*` package.
|
|
@@ -108,7 +110,7 @@ The `pkg-*` directories are reusable CareCard packages. Shared API response, err
|
|
|
108
110
|
|
|
109
111
|
### Dashboard Frontend
|
|
110
112
|
|
|
111
|
-
`app-dashboard` is a Next.js App Router TypeScript app using MUI, React Query, `next-intl`, and shared CareCard utilities. It consumes `api-auth`, `api-institutions`, `api-
|
|
113
|
+
`app-dashboard` is a Next.js App Router TypeScript app using MUI, React Query, `next-intl`, and shared CareCard utilities. It consumes `api-auth`, `api-institutions`, `api-messages`, and `api-user-profiles` through service modules.
|
|
112
114
|
|
|
113
115
|
- Keep backend URL definitions centralized in `src/services/api.routes.ts`.
|
|
114
116
|
- Keep fetch behavior centralized in `src/services/common/api`, especially `appFetch`, `api.client`, and `parseApiResponse`.
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,57 +1,35 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: CI_Tests
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
- main
|
|
7
|
-
- develop
|
|
8
6
|
- development
|
|
9
|
-
-
|
|
10
|
-
- feature/**
|
|
11
|
-
- feat/**
|
|
12
|
-
- improvement/**
|
|
13
|
-
- releases/**
|
|
14
|
-
- release*
|
|
15
|
-
- hotfix/**
|
|
16
|
-
- iss/**
|
|
17
|
-
- fix/**
|
|
18
|
-
- data**
|
|
19
|
-
- data/**
|
|
20
|
-
paths-ignore:
|
|
21
|
-
- '**.md'
|
|
7
|
+
- main
|
|
22
8
|
pull_request:
|
|
23
|
-
types: [closed]
|
|
24
9
|
branches:
|
|
25
|
-
- main
|
|
26
|
-
- develop
|
|
27
10
|
- development
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- hotfix/**
|
|
35
|
-
- iss/**
|
|
36
|
-
- fix/**
|
|
37
|
-
- data**
|
|
38
|
-
- data/**
|
|
11
|
+
- main
|
|
12
|
+
types:
|
|
13
|
+
- opened
|
|
14
|
+
- reopened
|
|
15
|
+
- synchronize
|
|
16
|
+
- ready_for_review
|
|
39
17
|
paths-ignore:
|
|
40
18
|
- '**.md'
|
|
41
19
|
|
|
42
20
|
jobs:
|
|
43
21
|
test:
|
|
44
|
-
|
|
22
|
+
name: CI_Tests
|
|
45
23
|
runs-on: ubuntu-latest
|
|
46
24
|
|
|
47
25
|
steps:
|
|
48
26
|
- name: Checkout repository
|
|
49
|
-
uses: actions/checkout@
|
|
27
|
+
uses: actions/checkout@v7
|
|
50
28
|
|
|
51
29
|
- name: Set up Node.js
|
|
52
|
-
uses: actions/setup-node@
|
|
30
|
+
uses: actions/setup-node@v6
|
|
53
31
|
with:
|
|
54
|
-
node-version:
|
|
32
|
+
node-version: 24.18.0
|
|
55
33
|
cache: 'npm'
|
|
56
34
|
|
|
57
35
|
- name: Install dependencies
|
package/.husky/pre-commit
CHANGED
|
@@ -151,10 +151,8 @@ function validateProperties(obj = {}) {
|
|
|
151
151
|
case 'user_id':
|
|
152
152
|
case 'address_id':
|
|
153
153
|
case 'addressId':
|
|
154
|
-
case 'image_id':
|
|
155
154
|
case 'itemId':
|
|
156
155
|
case 'userId':
|
|
157
|
-
case 'imageId':
|
|
158
156
|
case 'order_id':
|
|
159
157
|
case 'orderId':
|
|
160
158
|
case 'category_id':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carecard/validate",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/CareCard-ca/pkg-validate.git"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typescript": "6.0.3"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@carecard/common-util": "3.
|
|
41
|
+
"@carecard/common-util": "3.10.0"
|
|
42
42
|
},
|
|
43
43
|
"nyc": {
|
|
44
44
|
"all": true,
|
package/readme.md
CHANGED
|
@@ -13,6 +13,8 @@ not pass validation.
|
|
|
13
13
|
|
|
14
14
|
Non-negotiable TDD rule: Always write the failing test first, run it to confirm it fails for the intended reason, then implement the code and rerun the test until it passes. Test Driven Development is required for all coding work and must not be skipped. For documentation- or skill-only edits, add or update the relevant validation check before changing the prose.
|
|
15
15
|
|
|
16
|
+
Non-negotiable repository isolation rule: Every repository must run its Husky hooks and tests using only files, code, fixtures, dependencies, and services contained within that repository. Tests and Husky scripts must not import, require, read, execute, or otherwise depend on sibling repositories or paths outside the repository root. app-e2e-tests is the only exception because cross-repository end-to-end testing is its explicit responsibility.
|
|
17
|
+
|
|
16
18
|
Non-negotiable code organization rule: Functions with the same or equivalent behavior must use the same or clearly corresponding descriptive names across CareCard repositories, and equivalent functionality must live in files with the same names within each repository's established architecture. No backward compatibility names, aliases, or duplicate locations are allowed.
|
|
17
19
|
|
|
18
20
|
## Installation
|
|
@@ -102,30 +104,30 @@ validateProperties(input);
|
|
|
102
104
|
Keys are matched exactly. Both snake_case and camelCase variants are listed
|
|
103
105
|
where the package supports both.
|
|
104
106
|
|
|
105
|
-
| Validator | Keys
|
|
106
|
-
| --------------------------------------------------------- |
|
|
107
|
-
| `isNameString` | `first_name`, `firstName`, `last_name`, `lastName`, `username`, `new_status`, `newStatus`, `description`, `comment`, `status`, `name`, `title`, `brand`, `short_description`, `shortDescription`, `college_name`, `collegeName`, `campus_name`, `campusName`, `role`, `role_id`, `roleId`, `campus`, `institution_name`, `institutionName`, `program_name`, `programName`, `role_name`, `roleName`, `document_name`, `documentName`, `document_required_for_role_name`, `documentRequiredForRoleName`, `reason`, `entity_type`, `entityType`, `action_type`, `actionType`, `city`, `state`, `country`, `type`
|
|
108
|
-
| `isStreetString` | `street`
|
|
109
|
-
| `isCharactersString` | `postal_code`, `postalCode`, `period`
|
|
110
|
-
| `isBoolValue` | `is_primary`, `isPrimary`, `active`, `document_optional`, `documentOptional`
|
|
111
|
-
| `isSafeSearchString` | `search_string`, `searchString`
|
|
112
|
-
| `isString6To16CharacterLong` and `isSimplePasswordString` | `password`, `new_password`, `newPassword`
|
|
113
|
-
| `isString6To16CharacterLong` and `isPasswordString` | `strong_password`, `strongPassword`
|
|
114
|
-
| `isEmailString` | `email`
|
|
115
|
-
| `isPhoneNumber` | `phone_number`, `phoneNumber`
|
|
116
|
-
| `isCountryCodeString` | `country_code`, `countryCode`
|
|
117
|
-
| `isUrlSafeString` | `token`, `email_confirm_token`, `emailConfirmToken`, `verification_token`, `verificationToken`
|
|
118
|
-
| `isValidUuidString` | `uuid`, `item_id`, `itemId`, `user_id`, `userId`, `address_id`, `addressId`, `
|
|
119
|
-
| `isCcIdString` | `cc_id`, `ccId`
|
|
120
|
-
| `isValidIntegerString` | `offset_number`, `offsetNumber`, `number_of_orders`, `numberOfOrders`, `price`, `from`, `number`, `limit`, `offset`
|
|
121
|
-
| `isValidJsonString` on the raw value | `about`
|
|
122
|
-
| `isValidJsonString(JSON.stringify(value))` | `weight`, `dimensions`, `permission`, `scope_data`, `scopeData`, `meta_data`, `metaData`, `metadata`
|
|
123
|
-
| `isTextString` | `document_description`, `documentDescription`, `nick_name`, `nickName`, `requested_by_name`, `requestedByName`, `requested_by_email`, `requestedByEmail`, `requested_by_phone`, `requestedByPhone`, `approved_by_name`, `approvedByName`, `approved_by_email`, `approvedByEmail`, `approved_by_phone`, `approvedByPhone`
|
|
124
|
-
| `isValidArrayOfStrings` | `aliases`
|
|
125
|
-
| `isImageUrl` or `isValidUrl` | `image_url`, `imageUrl`, `website`, `file_url`, `fileUrl`
|
|
126
|
-
| `isValidDomainName` | `domain_name`, `domainName`, `domain`, `email_domain`, `emailDomain`, `email_domain_name`, `emailDomainName`
|
|
127
|
-
| `isValidTimestampzString` or `isValidTimestampString` | `expires_at`, `expiresAt`, `start_time`, `startTime`, `end_time`, `endTime`
|
|
128
|
-
| `isValidDateString` | `effective_start_date`, `effectiveStartDate`, `effective_end_date`, `effectiveEndDate`, `valid_until_date`, `validUntilDate`, `renew_date`, `renewDate`
|
|
107
|
+
| Validator | Keys |
|
|
108
|
+
| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
109
|
+
| `isNameString` | `first_name`, `firstName`, `last_name`, `lastName`, `username`, `new_status`, `newStatus`, `description`, `comment`, `status`, `name`, `title`, `brand`, `short_description`, `shortDescription`, `college_name`, `collegeName`, `campus_name`, `campusName`, `role`, `role_id`, `roleId`, `campus`, `institution_name`, `institutionName`, `program_name`, `programName`, `role_name`, `roleName`, `document_name`, `documentName`, `document_required_for_role_name`, `documentRequiredForRoleName`, `reason`, `entity_type`, `entityType`, `action_type`, `actionType`, `city`, `state`, `country`, `type` |
|
|
110
|
+
| `isStreetString` | `street` |
|
|
111
|
+
| `isCharactersString` | `postal_code`, `postalCode`, `period` |
|
|
112
|
+
| `isBoolValue` | `is_primary`, `isPrimary`, `active`, `document_optional`, `documentOptional` |
|
|
113
|
+
| `isSafeSearchString` | `search_string`, `searchString` |
|
|
114
|
+
| `isString6To16CharacterLong` and `isSimplePasswordString` | `password`, `new_password`, `newPassword` |
|
|
115
|
+
| `isString6To16CharacterLong` and `isPasswordString` | `strong_password`, `strongPassword` |
|
|
116
|
+
| `isEmailString` | `email` |
|
|
117
|
+
| `isPhoneNumber` | `phone_number`, `phoneNumber` |
|
|
118
|
+
| `isCountryCodeString` | `country_code`, `countryCode` |
|
|
119
|
+
| `isUrlSafeString` | `token`, `email_confirm_token`, `emailConfirmToken`, `verification_token`, `verificationToken` |
|
|
120
|
+
| `isValidUuidString` | `uuid`, `item_id`, `itemId`, `user_id`, `userId`, `address_id`, `addressId`, `order_id`, `orderId`, `category_id`, `categoryId`, `parent_id`, `parentId`, `college_id`, `collegeId`, `campus_id`, `campusId`, `program_id`, `programId`, `program_term_id`, `programTermId`, `template_id`, `templateId`, `program_template_id`, `programTemplateId`, `user_item_id`, `userItemId`, `user_item_status_id`, `userItemStatusId`, `requirement_item_id`, `requirementItemId`, `program_document_id`, `programDocumentId`, `id`, `institution_id`, `institutionId`, `role_assignment_id`, `roleAssignmentId`, `user_role_id`, `userRoleId`, `phone_number_id`, `phoneNumberId`, `entity_id`, `entityId`, `changed_by`, `changedBy`, `request_id`, `requestId` |
|
|
121
|
+
| `isCcIdString` | `cc_id`, `ccId` |
|
|
122
|
+
| `isValidIntegerString` | `offset_number`, `offsetNumber`, `number_of_orders`, `numberOfOrders`, `price`, `from`, `number`, `limit`, `offset` |
|
|
123
|
+
| `isValidJsonString` on the raw value | `about` |
|
|
124
|
+
| `isValidJsonString(JSON.stringify(value))` | `weight`, `dimensions`, `permission`, `scope_data`, `scopeData`, `meta_data`, `metaData`, `metadata` |
|
|
125
|
+
| `isTextString` | `document_description`, `documentDescription`, `nick_name`, `nickName`, `requested_by_name`, `requestedByName`, `requested_by_email`, `requestedByEmail`, `requested_by_phone`, `requestedByPhone`, `approved_by_name`, `approvedByName`, `approved_by_email`, `approvedByEmail`, `approved_by_phone`, `approvedByPhone` |
|
|
126
|
+
| `isValidArrayOfStrings` | `aliases` |
|
|
127
|
+
| `isImageUrl` or `isValidUrl` | `image_url`, `imageUrl`, `website`, `file_url`, `fileUrl` |
|
|
128
|
+
| `isValidDomainName` | `domain_name`, `domainName`, `domain`, `email_domain`, `emailDomain`, `email_domain_name`, `emailDomainName` |
|
|
129
|
+
| `isValidTimestampzString` or `isValidTimestampString` | `expires_at`, `expiresAt`, `start_time`, `startTime`, `end_time`, `endTime` |
|
|
130
|
+
| `isValidDateString` | `effective_start_date`, `effectiveStartDate`, `effective_end_date`, `effectiveEndDate`, `valid_until_date`, `validUntilDate`, `renew_date`, `renewDate` |
|
|
129
131
|
|
|
130
132
|
## `validateWhitelistProperties(inputObject, requiredProperties, options)`
|
|
131
133
|
|