PluginProbe
The Innovative Form Builder – IvyForms / 1.1.1
The Innovative Form Builder – IvyForms v1.1.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / constants / securityFields.ts

securityFields.ts in The Innovative Form Builder – IvyForms 1.1.1, at frontend/src/constants/securityFields.ts

27 lines 903 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Field Constants
3 *
4 * Shared field type constants used across the application.
5 * Centralised here so the list is defined once and imported wherever needed
6 * (form builder, integrations, entry manager, etc.).
7 */
8
9 /**
10 * Field types that are used for bot/spam protection.
11 * These fields should be excluded from stored entries, integration payloads,
12 * placeholder lists, and any other processing that targets user-submitted data.
13 */
14 export const SECURITY_FIELD_TYPES = ['recaptcha', 'turnstile', 'hcaptcha'] as const
15
16 export type SecurityFieldType = (typeof SECURITY_FIELD_TYPES)[number]
17
18 /**
19 * Returns true when the given field type is a security/CAPTCHA field.
20 *
21 * @example
22 * isSecurityField('recaptcha') // true
23 * isSecurityField('email') // false
24 */
25 export const isSecurityField = (fieldType: string): boolean =>
26 (SECURITY_FIELD_TYPES as readonly string[]).includes(fieldType)
27