Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-8027 added Cloudflare Turnstile as a captcha Provider #99

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"./process": "./lib/process/index.js",
"./types": "./lib/types/index.js",
"./experimental": "./lib/experimental/index.js",
"./dist/formio.core.min.js": "./dist/formio.core.min.js"
"./dist/formio.core.min.js": "./dist/formio.core.min.js",
"./error": "./lib/error/index.js"
},
"scripts": {
"test": "TEST=1 mocha -r ts-node/register -r tsconfig-paths/register -r mock-local-storage -r jsdom-global/register -b -t 0 'src/**/__tests__/*.test.ts'",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export * from './modules';
export * from './utils';
export * from './process/validation';
export * from './process/validation/rules';
export * from './process';
export * from './sdk';
export * from './types';
export * from './error';
3 changes: 0 additions & 3 deletions src/process/validation/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export const EN_ERRORS = {
invalidValueProperty: 'Invalid Value Property',
mask: '{{field}} does not match the mask.',
valueIsNotAvailable: '{{ field }} is an invalid value.',
captchaTokenValidation: 'ReCAPTCHA: Token validation error',
captchaTokenNotSpecified: 'ReCAPTCHA: Token is not specified in submission',
captchaFailure: 'ReCaptcha: Response token not found',
time: '{{field}} is not a valid time.',
invalidDate: '{{field}} is not a valid date',
number: '{{field}} is not a valid number.'
Expand Down
2 changes: 0 additions & 2 deletions src/process/validation/rules/databaseRules.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { ValidationRuleInfo } from "types";
import { validateUniqueInfo } from "./validateUnique";
import { validateCaptchaInfo } from "./validateCaptcha";
import { validateResourceSelectValueInfo } from "./validateResourceSelectValue";

// These are the validations that require a database connection.
export const databaseRules: ValidationRuleInfo[] = [
validateUniqueInfo,
validateCaptchaInfo,
validateResourceSelectValueInfo
];
42 changes: 0 additions & 42 deletions src/process/validation/rules/validateCaptcha.ts

This file was deleted.

5 changes: 3 additions & 2 deletions src/types/project/settings/ProjectSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ProjectFileStorageConfig,
ProjectGoogleDriveConfig,
ProjectKickboxConfig,
ProjectReCaptchaConfig,
ProjectCaptchaConfig,
ProjectSQLConnectorConfig,
} from './integrations';

Expand Down Expand Up @@ -39,7 +39,8 @@ export type ProjectSettings = {

// Integrations
email?: ProjectEmailConfig;
recaptcha?: ProjectReCaptchaConfig;
captcha?: ProjectCaptchaConfig;
recaptcha?: ProjectCaptchaConfig;
esign?: ProjectESignConfig;
google?: ProjectGoogleDriveConfig;
kickbox?: ProjectKickboxConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ProjectReCaptchaConfig = {
export type ProjectCaptchaConfig = {
siteKey: string;
secretKey: string;
};
2 changes: 1 addition & 1 deletion src/types/project/settings/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './dataConnections';
export * from './email';
export * from './eSign';
export * from './fileStorage';
export * from './reCaptcha';
export * from './captcha';
Loading