@shing.wong/sure-factor 0.1.1
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/LICENSE +21 -0
- package/README.md +317 -0
- package/catalog/assets/audio/error-bell.js +34 -0
- package/catalog/assets/audio/success-chime.js +38 -0
- package/catalog/assets/audio/voice-help.js +48 -0
- package/catalog/assets/data/icd10-codes.json +22 -0
- package/catalog/assets/data/us-zip-codes.json +22 -0
- package/catalog/assets/i18n/en.json +236 -0
- package/catalog/assets/i18n/es.json +236 -0
- package/catalog/assets/i18n/fr.json +236 -0
- package/catalog/assets/themes/dracula.css +295 -0
- package/catalog/assets/themes/forest.css +295 -0
- package/catalog/assets/themes/nord.css +295 -0
- package/catalog/components/auth-login.yaml +49 -0
- package/catalog/components/auth-register.yaml +45 -0
- package/catalog/components/auth-reset-password.yaml +38 -0
- package/catalog/components/crud-resource.yaml +59 -0
- package/catalog/components/data-table.yaml +54 -0
- package/catalog/components/dialog.yaml +80 -0
- package/catalog/components/form-modal.yaml +51 -0
- package/catalog/components/form.yaml +47 -0
- package/catalog/components/horizontal-icon-menu.yaml +39 -0
- package/catalog/components/markdown.yaml +33 -0
- package/catalog/components/message-actions.yaml +23 -0
- package/catalog/components/preview-panel.yaml +24 -0
- package/catalog/components/search-filter.yaml +50 -0
- package/catalog/components/session-list.yaml +36 -0
- package/catalog/types/credit-card.yaml +55 -0
- package/catalog/types/date-iso.yaml +52 -0
- package/catalog/types/date-us.yaml +52 -0
- package/catalog/types/ein.yaml +54 -0
- package/catalog/types/email.yaml +56 -0
- package/catalog/types/full-name.yaml +55 -0
- package/catalog/types/icd10.yaml +57 -0
- package/catalog/types/intl-phone.yaml +52 -0
- package/catalog/types/password.yaml +57 -0
- package/catalog/types/ssn.yaml +56 -0
- package/catalog/types/text.yaml +55 -0
- package/catalog/types/url.yaml +56 -0
- package/catalog/types/us-address.yaml +54 -0
- package/catalog/types/us-phone.yaml +52 -0
- package/catalog/types/zip5.yaml +53 -0
- package/catalog/types/zip9.yaml +52 -0
- package/dist/format.d.ts +15 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +46 -0
- package/dist/format.js.map +1 -0
- package/dist/generate-store.d.ts +20 -0
- package/dist/generate-store.d.ts.map +1 -0
- package/dist/generate-store.js +128 -0
- package/dist/generate-store.js.map +1 -0
- package/dist/generate.d.ts +19 -0
- package/dist/generate.d.ts.map +1 -0
- package/dist/generate.js +145 -0
- package/dist/generate.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/introspect.d.ts +23 -0
- package/dist/introspect.d.ts.map +1 -0
- package/dist/introspect.js +40 -0
- package/dist/introspect.js.map +1 -0
- package/dist/match.d.ts +10 -0
- package/dist/match.d.ts.map +1 -0
- package/dist/match.js +136 -0
- package/dist/match.js.map +1 -0
- package/dist/parse-yaml.d.ts +2 -0
- package/dist/parse-yaml.d.ts.map +1 -0
- package/dist/parse-yaml.js +152 -0
- package/dist/parse-yaml.js.map +1 -0
- package/dist/sanitize.d.ts +15 -0
- package/dist/sanitize.d.ts.map +1 -0
- package/dist/sanitize.js +101 -0
- package/dist/sanitize.js.map +1 -0
- package/dist/serialize.d.ts +15 -0
- package/dist/serialize.d.ts.map +1 -0
- package/dist/serialize.js +256 -0
- package/dist/serialize.js.map +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: ein
|
|
2
|
+
description: Employer Identification Number
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%ein%' OR column_name LIKE '%employer_id%'
|
|
5
|
+
regex: ^\d{2}-\d{7}$
|
|
6
|
+
maxLength: 10
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^\d{2}-\d{7}$
|
|
9
|
+
maxLength: 10
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- stripNonDigits
|
|
15
|
+
- formatAsEIN
|
|
16
|
+
output:
|
|
17
|
+
- htmlEscape
|
|
18
|
+
hints:
|
|
19
|
+
en:
|
|
20
|
+
placeholder: '12-3456789'
|
|
21
|
+
help: Employer Identification Number (XX-XXXXXXX)
|
|
22
|
+
error:
|
|
23
|
+
format: Must be 9 digits in format XX-XXXXXXX
|
|
24
|
+
required: EIN is required
|
|
25
|
+
es:
|
|
26
|
+
placeholder: '12-3456789'
|
|
27
|
+
help: Número de Identificación del Empleador (XX-XXXXXXX)
|
|
28
|
+
error:
|
|
29
|
+
format: Debe tener 9 dígitos en formato XX-XXXXXXX
|
|
30
|
+
required: EIN es obligatorio
|
|
31
|
+
fr:
|
|
32
|
+
placeholder: '12-3456789'
|
|
33
|
+
help: Numéro d identification de l employeur (XX-XXXXXXX)
|
|
34
|
+
error:
|
|
35
|
+
format: Doit contenir 9 chiffres au format XX-XXXXXXX
|
|
36
|
+
required: Numéro d identification requis
|
|
37
|
+
tiers:
|
|
38
|
+
vibe:
|
|
39
|
+
validation: { regex: ^\d{2}-\d{7}$ }
|
|
40
|
+
sanitize: [trim, stripNonDigits, slice(0, 10)]
|
|
41
|
+
hints: { en: { placeholder: '12-3456789' } }
|
|
42
|
+
prototype:
|
|
43
|
+
validation: { regex: ^\d{2}-\d{7}$, maxLength: 10 }
|
|
44
|
+
sanitize: [trim, stripNonDigits, formatAsEIN]
|
|
45
|
+
hints: { en: { placeholder: '12-3456789', help: 'EIN (XX-XXXXXXX)' }, es: { placeholder: '12-3456789', help: 'EIN (XX-XXXXXXX)' } }
|
|
46
|
+
production:
|
|
47
|
+
validation: { regex: ^\d{2}-\d{7}$, maxLength: 10, lookup: null }
|
|
48
|
+
sanitize: [trim, stripNonDigits, formatAsEIN]
|
|
49
|
+
hints: { en: { placeholder: '12-3456789', help: 'EIN (XX-XXXXXXX)' }, es: { placeholder: '12-3456789', help: 'EIN (XX-XXXXXXX)' }, fr: { placeholder: '12-3456789', help: 'EIN (XX-XXXXXXX)' } }
|
|
50
|
+
security:
|
|
51
|
+
encrypt: true
|
|
52
|
+
notes:
|
|
53
|
+
- 'Treat as sensitive business identifier'
|
|
54
|
+
- 'Encrypt at rest'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: email
|
|
2
|
+
description: Email address conforming to RFC 5322
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%email%' OR column_name LIKE '%mail%'
|
|
5
|
+
regex: ^[^@]+@[^@]+\.[^@]+$
|
|
6
|
+
maxLength: 254
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
|
|
9
|
+
maxLength: 254
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- lowercase
|
|
15
|
+
- normalize: NFKC
|
|
16
|
+
- stripControl
|
|
17
|
+
- slice(0, 254)
|
|
18
|
+
output:
|
|
19
|
+
- htmlEscape
|
|
20
|
+
hints:
|
|
21
|
+
en:
|
|
22
|
+
placeholder: 'user@example.com'
|
|
23
|
+
help: Email address
|
|
24
|
+
error:
|
|
25
|
+
format: Invalid email address
|
|
26
|
+
required: Email is required
|
|
27
|
+
es:
|
|
28
|
+
placeholder: 'usuario@ejemplo.com'
|
|
29
|
+
help: Dirección de correo electrónico
|
|
30
|
+
error:
|
|
31
|
+
format: Dirección de correo electrónico inválida
|
|
32
|
+
required: Correo electrónico es obligatorio
|
|
33
|
+
fr:
|
|
34
|
+
placeholder: 'utilisateur@exemple.com'
|
|
35
|
+
help: Adresse e-mail
|
|
36
|
+
error:
|
|
37
|
+
format: Adresse e-mail invalide
|
|
38
|
+
required: E-mail requis
|
|
39
|
+
tiers:
|
|
40
|
+
vibe:
|
|
41
|
+
validation: { regex: ^[^@]+@[^@]+\.[^@]+$, maxLength: null }
|
|
42
|
+
sanitize: [trim, lowercase]
|
|
43
|
+
hints: { en: { placeholder: 'user@example.com' } }
|
|
44
|
+
prototype:
|
|
45
|
+
validation: { regex: ^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$, maxLength: 254 }
|
|
46
|
+
sanitize: [trim, lowercase, normalize: NFKC, stripControl, slice(0, 254)]
|
|
47
|
+
hints: { en: { placeholder: 'user@example.com', help: 'Email address' }, es: { placeholder: 'usuario@ejemplo.com', help: 'Dirección de correo electrónico' } }
|
|
48
|
+
production:
|
|
49
|
+
validation: { regex: ^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$, maxLength: 254, lookup: null }
|
|
50
|
+
sanitize: [trim, lowercase, normalize: NFKC, stripControl, slice(0, 254)]
|
|
51
|
+
hints: { en: { placeholder: 'user@example.com', help: 'Email address' }, es: { placeholder: 'usuario@ejemplo.com', help: 'Dirección de correo electrónico' }, fr: { placeholder: 'utilisateur@exemple.com', help: 'Adresse e-mail' } }
|
|
52
|
+
security:
|
|
53
|
+
encrypt: false
|
|
54
|
+
notes:
|
|
55
|
+
- 'Normalize Unicode NFKC to prevent homoglyph attacks'
|
|
56
|
+
- 'Lowercase to ensure case-insensitive matching'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: full-name
|
|
2
|
+
description: Person full name
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%name%' OR column_name LIKE '%full_name%'
|
|
5
|
+
maxLength: 100
|
|
6
|
+
validation:
|
|
7
|
+
regex: null
|
|
8
|
+
maxLength: 100
|
|
9
|
+
lookup: null
|
|
10
|
+
sanitize:
|
|
11
|
+
input:
|
|
12
|
+
- trim
|
|
13
|
+
- collapseWhitespace
|
|
14
|
+
- normalize: NFKC
|
|
15
|
+
- stripControl
|
|
16
|
+
- slice(0, 100)
|
|
17
|
+
output:
|
|
18
|
+
- htmlEscape
|
|
19
|
+
hints:
|
|
20
|
+
en:
|
|
21
|
+
placeholder: 'Jane Doe'
|
|
22
|
+
help: Full legal name
|
|
23
|
+
error:
|
|
24
|
+
format: Name must be 1-100 characters
|
|
25
|
+
required: Name is required
|
|
26
|
+
es:
|
|
27
|
+
placeholder: 'María García'
|
|
28
|
+
help: Nombre completo legal
|
|
29
|
+
error:
|
|
30
|
+
format: El nombre debe tener entre 1 y 100 caracteres
|
|
31
|
+
required: Nombre es obligatorio
|
|
32
|
+
fr:
|
|
33
|
+
placeholder: 'Jean Dupont'
|
|
34
|
+
help: Nom légal complet
|
|
35
|
+
error:
|
|
36
|
+
format: Le nom doit contenir entre 1 et 100 caractères
|
|
37
|
+
required: Nom requis
|
|
38
|
+
tiers:
|
|
39
|
+
vibe:
|
|
40
|
+
validation: { regex: null, maxLength: 100 }
|
|
41
|
+
sanitize: [trim, collapseWhitespace, slice(0, 100)]
|
|
42
|
+
hints: { en: { placeholder: 'Jane Doe' } }
|
|
43
|
+
prototype:
|
|
44
|
+
validation: { regex: null, maxLength: 100 }
|
|
45
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, 100)]
|
|
46
|
+
hints: { en: { placeholder: 'Jane Doe', help: 'Full legal name' }, es: { placeholder: 'María García', help: 'Nombre completo legal' } }
|
|
47
|
+
production:
|
|
48
|
+
validation: { regex: null, maxLength: 100, lookup: null }
|
|
49
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, 100)]
|
|
50
|
+
hints: { en: { placeholder: 'Jane Doe', help: 'Full legal name' }, es: { placeholder: 'María García', help: 'Nombre completo legal' }, fr: { placeholder: 'Jean Dupont', help: 'Nom légal complet' } }
|
|
51
|
+
security:
|
|
52
|
+
encrypt: false
|
|
53
|
+
notes:
|
|
54
|
+
- 'NFKC normalization prevents homoglyph attacks (e.g., Cyrillic "а" vs Latin "a")'
|
|
55
|
+
- 'Strip control characters including zero-width spaces and direction overrides'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: icd10
|
|
2
|
+
description: ICD-10 diagnosis code
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%diagnosis%' OR column_name LIKE '%icd%' OR column_name LIKE '%code%'
|
|
5
|
+
regex: ^[A-Z]\d{2}(\.\d{1,4})?$
|
|
6
|
+
maxLength: 8
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^[A-Z]\d{2}(\.\d{1,4})?$
|
|
9
|
+
maxLength: 8
|
|
10
|
+
lookup: icd10-codes.json
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- uppercase
|
|
15
|
+
- stripNonAlphanumeric
|
|
16
|
+
- normalize: NFKC
|
|
17
|
+
- slice(0, 8)
|
|
18
|
+
output:
|
|
19
|
+
- htmlEscape
|
|
20
|
+
hints:
|
|
21
|
+
en:
|
|
22
|
+
placeholder: 'J45.901'
|
|
23
|
+
help: ICD-10 code (e.g., J45.901 for Asthma)
|
|
24
|
+
error:
|
|
25
|
+
format: Must be a valid ICD-10 code (letter + 2 digits, optional decimal)
|
|
26
|
+
required: Diagnosis code is required
|
|
27
|
+
es:
|
|
28
|
+
placeholder: 'J45.901'
|
|
29
|
+
help: Código CIE-10 (ej., J45.901 Asma)
|
|
30
|
+
error:
|
|
31
|
+
format: Debe ser un código CIE-10 válido (letra + 2 dígitos, decimal opcional)
|
|
32
|
+
required: Código de diagnóstico es obligatorio
|
|
33
|
+
fr:
|
|
34
|
+
placeholder: 'J45.901'
|
|
35
|
+
help: Code CIM-10 (ex., J45.901 pour Asthme)
|
|
36
|
+
error:
|
|
37
|
+
format: Doit être un code CIM-10 valide (lettre + 2 chiffres, décimal optionnel)
|
|
38
|
+
required: Code de diagnostic requis
|
|
39
|
+
tiers:
|
|
40
|
+
vibe:
|
|
41
|
+
validation: { regex: ^[A-Z]\d{2}(\.\d{1,4})?$ }
|
|
42
|
+
sanitize: [trim, uppercase, slice(0, 8)]
|
|
43
|
+
hints: { en: { placeholder: 'J45.901' } }
|
|
44
|
+
prototype:
|
|
45
|
+
validation: { regex: ^[A-Z]\d{2}(\.\d{1,4})?$, maxLength: 8 }
|
|
46
|
+
sanitize: [trim, uppercase, stripNonAlphanumeric, normalize: NFKC, slice(0, 8)]
|
|
47
|
+
hints: { en: { placeholder: 'J45.901', help: 'ICD-10 code (e.g., J45.901 for Asthma)' }, es: { placeholder: 'J45.901', help: 'Código CIE-10 (ej., J45.901 Asma)' } }
|
|
48
|
+
production:
|
|
49
|
+
validation: { regex: ^[A-Z]\d{2}(\.\d{1,4})?$, maxLength: 8, lookup: icd10-codes.json }
|
|
50
|
+
sanitize: [trim, uppercase, stripNonAlphanumeric, normalize: NFKC, slice(0, 8)]
|
|
51
|
+
hints: { en: { placeholder: 'J45.901', help: 'ICD-10 code (e.g., J45.901 for Asthma)' }, es: { placeholder: 'J45.901', help: 'Código CIE-10 (ej., J45.901 Asma)' }, fr: { placeholder: 'J45.901', help: 'Code CIM-10 (ex., J45.901 pour Asthme)' } }
|
|
52
|
+
security:
|
|
53
|
+
encrypt: true
|
|
54
|
+
notes:
|
|
55
|
+
- 'PHI — encrypt at rest'
|
|
56
|
+
- 'Audit log all accesses'
|
|
57
|
+
- 'Never log full ICD-10 codes without consent'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: intl-phone
|
|
2
|
+
description: International phone number
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%phone_intl%' OR column_name LIKE '%mobile%'
|
|
5
|
+
regex: ^\+\d{7,15}$
|
|
6
|
+
maxLength: 20
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^\+\d{7,15}$
|
|
9
|
+
maxLength: 20
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- stripNonDigits
|
|
14
|
+
- normalize: NFKC
|
|
15
|
+
- slice(0, 20)
|
|
16
|
+
output:
|
|
17
|
+
- htmlEscape
|
|
18
|
+
hints:
|
|
19
|
+
en:
|
|
20
|
+
placeholder: '+44 20 7946 0958'
|
|
21
|
+
help: International phone number starting with + and country code
|
|
22
|
+
error:
|
|
23
|
+
format: Must start with + and contain 7-15 digits
|
|
24
|
+
required: Phone number is required
|
|
25
|
+
es:
|
|
26
|
+
placeholder: '+34 91 123 4567'
|
|
27
|
+
help: Número telefónico internacional comenzando con + y código de país
|
|
28
|
+
error:
|
|
29
|
+
format: Debe comenzar con + y contener 7-15 dígitos
|
|
30
|
+
required: Número telefónico es obligatorio
|
|
31
|
+
fr:
|
|
32
|
+
placeholder: '+33 1 23 45 67 89'
|
|
33
|
+
help: Numéro de téléphone international commençant par + et indicatif du pays
|
|
34
|
+
error:
|
|
35
|
+
format: Doit commencer par + et contenir 7-15 chiffres
|
|
36
|
+
required: Numéro de téléphone requis
|
|
37
|
+
tiers:
|
|
38
|
+
vibe:
|
|
39
|
+
validation: { regex: ^\+\d{7,15}$ }
|
|
40
|
+
sanitize: [stripNonDigits, slice(0, 20)]
|
|
41
|
+
hints: { en: { placeholder: '+44 20 7946 0958' } }
|
|
42
|
+
prototype:
|
|
43
|
+
validation: { regex: ^\+\d{7,15}$, maxLength: 20 }
|
|
44
|
+
sanitize: [stripNonDigits, normalize: NFKC, slice(0, 20)]
|
|
45
|
+
hints: { en: { placeholder: '+44 20 7946 0958', help: 'International phone starting with +' }, es: { placeholder: '+34 91 123 4567', help: 'Número internacional comenzando con +' } }
|
|
46
|
+
production:
|
|
47
|
+
validation: { regex: ^\+\d{7,15}$, maxLength: 20, lookup: null }
|
|
48
|
+
sanitize: [stripNonDigits, normalize: NFKC, slice(0, 20)]
|
|
49
|
+
hints: { en: { placeholder: '+44 20 7946 0958', help: 'International phone starting with +' }, es: { placeholder: '+34 91 123 4567', help: 'Número internacional comenzando con +' }, fr: { placeholder: '+33 1 23 45 67 89', help: 'Numéro international commençant par +' } }
|
|
50
|
+
security:
|
|
51
|
+
encrypt: false
|
|
52
|
+
notes: []
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: password
|
|
2
|
+
description: Password field (never stored in plaintext)
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%password%'
|
|
5
|
+
maxLength: 128
|
|
6
|
+
validation:
|
|
7
|
+
regex: null
|
|
8
|
+
minLength: 8
|
|
9
|
+
maxLength: 128
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
output:
|
|
15
|
+
- mask
|
|
16
|
+
hints:
|
|
17
|
+
en:
|
|
18
|
+
placeholder: '••••••••'
|
|
19
|
+
help: At least 8 characters with uppercase, lowercase, and number
|
|
20
|
+
error:
|
|
21
|
+
format: Must be at least 8 characters with uppercase, lowercase, and a number
|
|
22
|
+
required: Password is required
|
|
23
|
+
tooShort: Must be at least 8 characters
|
|
24
|
+
es:
|
|
25
|
+
placeholder: '••••••••'
|
|
26
|
+
help: Al menos 8 caracteres con mayúscula, minúscula y número
|
|
27
|
+
error:
|
|
28
|
+
format: Debe tener al menos 8 caracteres con mayúscula, minúscula y número
|
|
29
|
+
required: Contraseña es obligatoria
|
|
30
|
+
tooShort: Debe tener al menos 8 caracteres
|
|
31
|
+
fr:
|
|
32
|
+
placeholder: '••••••••'
|
|
33
|
+
help: Au moins 8 caractères avec majuscule, minuscule et chiffre
|
|
34
|
+
error:
|
|
35
|
+
format: Doit contenir au moins 8 caractères avec majuscule, minuscule et chiffre
|
|
36
|
+
required: Mot de passe requis
|
|
37
|
+
tooShort: Doit contenir au moins 8 caractères
|
|
38
|
+
tiers:
|
|
39
|
+
vibe:
|
|
40
|
+
validation: { regex: null, minLength: 8, maxLength: 128 }
|
|
41
|
+
sanitize: [trim]
|
|
42
|
+
hints: { en: { placeholder: '••••••••' } }
|
|
43
|
+
prototype:
|
|
44
|
+
validation: { regex: null, minLength: 8, maxLength: 128 }
|
|
45
|
+
sanitize: [trim]
|
|
46
|
+
hints: { en: { placeholder: '••••••••', help: '8+ chars with upper, lower, number' }, es: { placeholder: '••••••••', help: '8+ caracteres con mayúscula, minúscula y número' } }
|
|
47
|
+
production:
|
|
48
|
+
validation: { regex: null, minLength: 8, maxLength: 128, lookup: null }
|
|
49
|
+
sanitize: [trim]
|
|
50
|
+
hints: { en: { placeholder: '••••••••', help: '8+ chars with upper, lower, number' }, es: { placeholder: '••••••••', help: '8+ caracteres con mayúscula, minúscula y número' }, fr: { placeholder: '••••••••', help: '8+ caractères avec majuscule, minuscule, chiffre' } }
|
|
51
|
+
security:
|
|
52
|
+
encrypt: true
|
|
53
|
+
notes:
|
|
54
|
+
- 'NEVER log password value at any stage'
|
|
55
|
+
- 'NEVER store plaintext — always hash with bcrypt/argon2'
|
|
56
|
+
- 'Do not reveal password strength indicators to network observers'
|
|
57
|
+
- 'Rate limit login attempts'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: ssn
|
|
2
|
+
description: US Social Security Number
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%ssn%' OR column_name LIKE '%social%'
|
|
5
|
+
regex: ^\d{3}-\d{2}-\d{4}$
|
|
6
|
+
maxLength: 11
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^\d{3}-\d{2}-\d{4}$
|
|
9
|
+
maxLength: 11
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- stripNonDigits
|
|
15
|
+
- formatAsSSN
|
|
16
|
+
output:
|
|
17
|
+
- maskLast4
|
|
18
|
+
hints:
|
|
19
|
+
en:
|
|
20
|
+
placeholder: '***-**-1234'
|
|
21
|
+
help: Social Security Number (last 4 digits only will be visible)
|
|
22
|
+
error:
|
|
23
|
+
format: Must be 9 digits in format XXX-XX-XXXX
|
|
24
|
+
required: SSN is required
|
|
25
|
+
es:
|
|
26
|
+
placeholder: '***-**-1234'
|
|
27
|
+
help: Número de Seguro Social (solo los últimos 4 dígitos serán visibles)
|
|
28
|
+
error:
|
|
29
|
+
format: Debe tener 9 dígitos en formato XXX-XX-XXXX
|
|
30
|
+
required: SSN es obligatorio
|
|
31
|
+
fr:
|
|
32
|
+
placeholder: '***-**-1234'
|
|
33
|
+
help: Numéro de sécurité sociale (seuls les 4 derniers chiffres seront visibles)
|
|
34
|
+
error:
|
|
35
|
+
format: Doit contenir 9 chiffres au format XXX-XX-XXXX
|
|
36
|
+
required: Numéro de sécurité sociale requis
|
|
37
|
+
tiers:
|
|
38
|
+
vibe:
|
|
39
|
+
validation: { regex: ^\d{3}-\d{2}-\d{4}$ }
|
|
40
|
+
sanitize: [trim, stripNonDigits]
|
|
41
|
+
hints: { en: { placeholder: '***-**-1234' } }
|
|
42
|
+
prototype:
|
|
43
|
+
validation: { regex: ^\d{3}-\d{2}-\d{4}$, maxLength: 11 }
|
|
44
|
+
sanitize: [trim, stripNonDigits, formatAsSSN]
|
|
45
|
+
hints: { en: { placeholder: '***-**-1234', help: 'SSN (last 4 visible)' }, es: { placeholder: '***-**-1234', help: 'SSN (últimos 4 visibles)' } }
|
|
46
|
+
production:
|
|
47
|
+
validation: { regex: ^\d{3}-\d{2}-\d{4}$, maxLength: 11, lookup: null }
|
|
48
|
+
sanitize: [trim, stripNonDigits, formatAsSSN]
|
|
49
|
+
hints: { en: { placeholder: '***-**-1234', help: 'SSN (last 4 visible)' }, es: { placeholder: '***-**-1234', help: 'SSN (últimos 4 visibles)' }, fr: { placeholder: '***-**-1234', help: 'SSN (4 derniers visibles)' } }
|
|
50
|
+
security:
|
|
51
|
+
encrypt: true
|
|
52
|
+
notes:
|
|
53
|
+
- 'PHI — encrypt at rest'
|
|
54
|
+
- 'Mask all but last 4 digits in UI'
|
|
55
|
+
- 'Audit log all SSN access'
|
|
56
|
+
- 'Never log full SSN'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: text
|
|
2
|
+
description: General-purpose text field (fallback when no specific type matches)
|
|
3
|
+
match:
|
|
4
|
+
sql: data_type IN ('varchar', 'text', 'character varying')
|
|
5
|
+
maxLength: null
|
|
6
|
+
validation:
|
|
7
|
+
regex: null
|
|
8
|
+
maxLength: null
|
|
9
|
+
lookup: null
|
|
10
|
+
sanitize:
|
|
11
|
+
input:
|
|
12
|
+
- trim
|
|
13
|
+
- collapseWhitespace
|
|
14
|
+
- normalize: NFKC
|
|
15
|
+
- stripControl
|
|
16
|
+
- slice(0, maxLength)
|
|
17
|
+
output:
|
|
18
|
+
- htmlEscape
|
|
19
|
+
hints:
|
|
20
|
+
en:
|
|
21
|
+
placeholder: 'Enter text...'
|
|
22
|
+
help: ''
|
|
23
|
+
error:
|
|
24
|
+
format: ''
|
|
25
|
+
required: This field is required
|
|
26
|
+
es:
|
|
27
|
+
placeholder: 'Ingrese texto...'
|
|
28
|
+
help: ''
|
|
29
|
+
error:
|
|
30
|
+
format: ''
|
|
31
|
+
required: Este campo es obligatorio
|
|
32
|
+
fr:
|
|
33
|
+
placeholder: 'Entrez du texte...'
|
|
34
|
+
help: ''
|
|
35
|
+
error:
|
|
36
|
+
format: ''
|
|
37
|
+
required: Ce champ est requis
|
|
38
|
+
tiers:
|
|
39
|
+
vibe:
|
|
40
|
+
validation: { regex: null, maxLength: null }
|
|
41
|
+
sanitize: [trim, slice(0, maxLength)]
|
|
42
|
+
hints: { en: { placeholder: 'Enter text...' } }
|
|
43
|
+
prototype:
|
|
44
|
+
validation: { regex: null, maxLength: null }
|
|
45
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, maxLength)]
|
|
46
|
+
hints: { en: { placeholder: 'Enter text...' }, es: { placeholder: 'Ingrese texto...' } }
|
|
47
|
+
production:
|
|
48
|
+
validation: { regex: null, maxLength: null, lookup: null }
|
|
49
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, maxLength)]
|
|
50
|
+
hints: { en: { placeholder: 'Enter text...' }, es: { placeholder: 'Ingrese texto...' }, fr: { placeholder: 'Entrez du texte...' } }
|
|
51
|
+
security:
|
|
52
|
+
encrypt: false
|
|
53
|
+
notes:
|
|
54
|
+
- 'Fallback type — used when no specific type matches column name'
|
|
55
|
+
- 'Rich text fields should use a separate rich-text type with DOMPurify'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: url
|
|
2
|
+
description: URL or website address
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%url%' OR column_name LIKE '%website%' OR column_name LIKE '%link%'
|
|
5
|
+
regex: ^https?://
|
|
6
|
+
maxLength: 2048
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^https?://[^\s/$.?#].[^\s]*$
|
|
9
|
+
maxLength: 2048
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- lowercase
|
|
15
|
+
- stripJavaScriptProtocol
|
|
16
|
+
- normalize: NFKC
|
|
17
|
+
- slice(0, 2048)
|
|
18
|
+
output:
|
|
19
|
+
- htmlEscape
|
|
20
|
+
hints:
|
|
21
|
+
en:
|
|
22
|
+
placeholder: 'https://example.com'
|
|
23
|
+
help: Full URL including https://
|
|
24
|
+
error:
|
|
25
|
+
format: Must be a valid URL starting with http:// or https://
|
|
26
|
+
required: URL is required
|
|
27
|
+
es:
|
|
28
|
+
placeholder: 'https://ejemplo.com'
|
|
29
|
+
help: URL completa incluyendo https://
|
|
30
|
+
error:
|
|
31
|
+
format: Debe ser una URL válida comenzando con http:// o https://
|
|
32
|
+
required: URL es obligatoria
|
|
33
|
+
fr:
|
|
34
|
+
placeholder: 'https://exemple.fr'
|
|
35
|
+
help: URL complète incluant https://
|
|
36
|
+
error:
|
|
37
|
+
format: Doit être une URL valide commençant par http:// ou https://
|
|
38
|
+
required: URL requise
|
|
39
|
+
tiers:
|
|
40
|
+
vibe:
|
|
41
|
+
validation: { regex: ^https?://[^\s/$.?#].[^\s]*$ }
|
|
42
|
+
sanitize: [trim, lowercase, slice(0, 2048)]
|
|
43
|
+
hints: { en: { placeholder: 'https://example.com' } }
|
|
44
|
+
prototype:
|
|
45
|
+
validation: { regex: ^https?://[^\s/$.?#].[^\s]*$, maxLength: 2048 }
|
|
46
|
+
sanitize: [trim, lowercase, stripJavaScriptProtocol, normalize: NFKC, slice(0, 2048)]
|
|
47
|
+
hints: { en: { placeholder: 'https://example.com', help: 'Full URL including https://' }, es: { placeholder: 'https://ejemplo.com', help: 'URL completa con https://' } }
|
|
48
|
+
production:
|
|
49
|
+
validation: { regex: ^https?://[^\s/$.?#].[^\s]*$, maxLength: 2048, lookup: null }
|
|
50
|
+
sanitize: [trim, lowercase, stripJavaScriptProtocol, normalize: NFKC, slice(0, 2048)]
|
|
51
|
+
hints: { en: { placeholder: 'https://example.com', help: 'Full URL including https://' }, es: { placeholder: 'https://ejemplo.com', help: 'URL completa con https://' }, fr: { placeholder: 'https://exemple.fr', help: 'URL complète avec https://' } }
|
|
52
|
+
security:
|
|
53
|
+
encrypt: false
|
|
54
|
+
notes:
|
|
55
|
+
- 'Strip javascript: protocol to prevent XSS'
|
|
56
|
+
- 'Validate URL resolves if production tier'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: us-address
|
|
2
|
+
description: US street address
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%address%' OR column_name LIKE '%street%'
|
|
5
|
+
maxLength: 200
|
|
6
|
+
validation:
|
|
7
|
+
regex: null
|
|
8
|
+
maxLength: 200
|
|
9
|
+
lookup: null
|
|
10
|
+
sanitize:
|
|
11
|
+
input:
|
|
12
|
+
- trim
|
|
13
|
+
- collapseWhitespace
|
|
14
|
+
- normalize: NFKC
|
|
15
|
+
- stripControl
|
|
16
|
+
- slice(0, 200)
|
|
17
|
+
output:
|
|
18
|
+
- htmlEscape
|
|
19
|
+
hints:
|
|
20
|
+
en:
|
|
21
|
+
placeholder: '123 Main St, Springfield, IL 62701'
|
|
22
|
+
help: Street address, city, state, and ZIP code
|
|
23
|
+
error:
|
|
24
|
+
format: Must be a valid address
|
|
25
|
+
required: Address is required
|
|
26
|
+
es:
|
|
27
|
+
placeholder: 'Calle Principal 123, Springfield, IL 62701'
|
|
28
|
+
help: Dirección completa incluyendo ciudad, estado y código postal
|
|
29
|
+
error:
|
|
30
|
+
format: Debe ser una dirección válida
|
|
31
|
+
required: Dirección es obligatoria
|
|
32
|
+
fr:
|
|
33
|
+
placeholder: '123 Rue Principale, Springfield, IL 62701'
|
|
34
|
+
help: Adresse complète incluant ville, état et code postal
|
|
35
|
+
error:
|
|
36
|
+
format: Doit être une adresse valide
|
|
37
|
+
required: Adresse requise
|
|
38
|
+
tiers:
|
|
39
|
+
vibe:
|
|
40
|
+
validation: { regex: null, maxLength: 200 }
|
|
41
|
+
sanitize: [trim, collapseWhitespace, slice(0, 200)]
|
|
42
|
+
hints: { en: { placeholder: '123 Main St, Springfield, IL 62701' } }
|
|
43
|
+
prototype:
|
|
44
|
+
validation: { regex: null, maxLength: 200 }
|
|
45
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, 200)]
|
|
46
|
+
hints: { en: { placeholder: '123 Main St, Springfield, IL 62701', help: 'Street address, city, state, ZIP' }, es: { placeholder: 'Calle Principal 123, Springfield, IL 62701', help: 'Dirección completa' } }
|
|
47
|
+
production:
|
|
48
|
+
validation: { regex: null, maxLength: 200, lookup: null }
|
|
49
|
+
sanitize: [trim, collapseWhitespace, normalize: NFKC, stripControl, slice(0, 200)]
|
|
50
|
+
hints: { en: { placeholder: '123 Main St, Springfield, IL 62701', help: 'Street address, city, state, ZIP' }, es: { placeholder: 'Calle Principal 123, Springfield, IL 62701', help: 'Dirección completa' }, fr: { placeholder: '123 Rue Principale, Springfield, IL 62701', help: 'Adresse complète' } }
|
|
51
|
+
security:
|
|
52
|
+
encrypt: false
|
|
53
|
+
notes:
|
|
54
|
+
- 'Consider USPS address verification API for production tier'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: us-phone
|
|
2
|
+
description: US phone number with +1 prefix
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%phone%' AND data_type IN ('varchar(20)', 'varchar(15)')
|
|
5
|
+
regex: ^\+1\d{10}$
|
|
6
|
+
maxLength: 15
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^\+1\d{10}$
|
|
9
|
+
maxLength: 15
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- stripNonDigits
|
|
14
|
+
- normalize: NFKC
|
|
15
|
+
- slice(0, 15)
|
|
16
|
+
output:
|
|
17
|
+
- htmlEscape
|
|
18
|
+
hints:
|
|
19
|
+
en:
|
|
20
|
+
placeholder: '+1 (555) 123-4567'
|
|
21
|
+
help: US phone number with area code
|
|
22
|
+
error:
|
|
23
|
+
format: Must be a valid US phone number (e.g., +14155551234)
|
|
24
|
+
required: Phone number is required
|
|
25
|
+
es:
|
|
26
|
+
placeholder: '+1 (555) 123-4567'
|
|
27
|
+
help: Número telefónico de EE.UU. con código de área
|
|
28
|
+
error:
|
|
29
|
+
format: Debe ser un número telefónico válido de EE.UU.
|
|
30
|
+
required: Número telefónico es obligatorio
|
|
31
|
+
fr:
|
|
32
|
+
placeholder: '+1 (555) 123-4567'
|
|
33
|
+
help: Numéro de téléphone américain avec indicatif régional
|
|
34
|
+
error:
|
|
35
|
+
format: Doit être un numéro de téléphone américain valide
|
|
36
|
+
required: Numéro de téléphone requis
|
|
37
|
+
tiers:
|
|
38
|
+
vibe:
|
|
39
|
+
validation: { regex: ^\+1\d{10}$ }
|
|
40
|
+
sanitize: [stripNonDigits, slice(0, 15)]
|
|
41
|
+
hints: { en: { placeholder: '+1 (555) 123-4567' } }
|
|
42
|
+
prototype:
|
|
43
|
+
validation: { regex: ^\+1\d{10}$, maxLength: 15 }
|
|
44
|
+
sanitize: [stripNonDigits, normalize: NFKC, slice(0, 15)]
|
|
45
|
+
hints: { en: { placeholder: '+1 (555) 123-4567', help: 'US phone number with area code' }, es: { placeholder: '+1 (555) 123-4567', help: 'Número telefónico de EE.UU. con código de área' } }
|
|
46
|
+
production:
|
|
47
|
+
validation: { regex: ^\+1\d{10}$, maxLength: 15, lookup: null }
|
|
48
|
+
sanitize: [stripNonDigits, normalize: NFKC, slice(0, 15)]
|
|
49
|
+
hints: { en: { placeholder: '+1 (555) 123-4567', help: 'US phone number with area code' }, es: { placeholder: '+1 (555) 123-4567', help: 'Número telefónico de EE.UU. con código de área' }, fr: { placeholder: '+1 (555) 123-4567', help: 'Numéro de téléphone américain avec indicatif régional' } }
|
|
50
|
+
security:
|
|
51
|
+
encrypt: false
|
|
52
|
+
notes: []
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: zip5
|
|
2
|
+
description: 5-digit US ZIP code
|
|
3
|
+
match:
|
|
4
|
+
sql: column_name LIKE '%zip%' OR column_name LIKE '%postal%'
|
|
5
|
+
regex: ^\d{5}$
|
|
6
|
+
maxLength: 5
|
|
7
|
+
validation:
|
|
8
|
+
regex: ^\d{5}$
|
|
9
|
+
maxLength: 5
|
|
10
|
+
lookup: null
|
|
11
|
+
sanitize:
|
|
12
|
+
input:
|
|
13
|
+
- trim
|
|
14
|
+
- stripNonDigits
|
|
15
|
+
- normalize: NFKC
|
|
16
|
+
- slice(0, 5)
|
|
17
|
+
output:
|
|
18
|
+
- htmlEscape
|
|
19
|
+
hints:
|
|
20
|
+
en:
|
|
21
|
+
placeholder: '90210'
|
|
22
|
+
help: 5-digit US ZIP code
|
|
23
|
+
error:
|
|
24
|
+
format: Must be exactly 5 digits
|
|
25
|
+
required: ZIP code is required
|
|
26
|
+
es:
|
|
27
|
+
placeholder: '01234'
|
|
28
|
+
help: Código postal de 5 dígitos
|
|
29
|
+
error:
|
|
30
|
+
format: Debe tener exactamente 5 dígitos
|
|
31
|
+
required: Código postal es obligatorio
|
|
32
|
+
fr:
|
|
33
|
+
placeholder: '75001'
|
|
34
|
+
help: Code postal américain à 5 chiffres
|
|
35
|
+
error:
|
|
36
|
+
format: Doit contenir exactement 5 chiffres
|
|
37
|
+
required: Code postal requis
|
|
38
|
+
tiers:
|
|
39
|
+
vibe:
|
|
40
|
+
validation: { regex: ^\d{5}$ }
|
|
41
|
+
sanitize: [trim, htmlEscape]
|
|
42
|
+
hints: { en: { placeholder: '90210' } }
|
|
43
|
+
prototype:
|
|
44
|
+
validation: { regex: ^\d{5}$, maxLength: 5 }
|
|
45
|
+
sanitize: [trim, stripNonDigits, normalize: NFKC, slice(0, 5)]
|
|
46
|
+
hints: { en: { placeholder: '90210', help: '5-digit US ZIP code' }, es: { placeholder: '01234', help: 'Código postal de 5 dígitos' } }
|
|
47
|
+
production:
|
|
48
|
+
validation: { regex: ^\d{5}$, maxLength: 5, lookup: us-zip-codes.json }
|
|
49
|
+
sanitize: [trim, stripNonDigits, normalize: NFKC, slice(0, 5)]
|
|
50
|
+
hints: { en: { placeholder: '90210', help: '5-digit US ZIP code' }, es: { placeholder: '01234', help: 'Código postal de 5 dígitos' }, fr: { placeholder: '75001', help: 'Code postal américain à 5 chiffres' } }
|
|
51
|
+
security:
|
|
52
|
+
encrypt: false
|
|
53
|
+
notes: []
|