= ({
+ element,
+ context,
+ children,
+ stack = [],
+}) => {
+ const uiElement = useMemo(
+ () => new UIElement(element, context, stack),
+ [element, context, stack],
+ );
+ const error = useValidatedInput(uiElement);
+
+ return (
+
+
+
+ {children}
+ {error && {error}}
+
+ );
+};
diff --git a/apps/kyb-app/src/poc/FieldList/index.ts b/apps/kyb-app/src/poc/FieldList/index.ts
new file mode 100644
index 0000000000..9fb4cd2987
--- /dev/null
+++ b/apps/kyb-app/src/poc/FieldList/index.ts
@@ -0,0 +1 @@
+export * from './FieldList';
diff --git a/apps/kyb-app/src/poc/SubmitButton/SubmitButton.tsx b/apps/kyb-app/src/poc/SubmitButton/SubmitButton.tsx
new file mode 100644
index 0000000000..59f726aa22
--- /dev/null
+++ b/apps/kyb-app/src/poc/SubmitButton/SubmitButton.tsx
@@ -0,0 +1,20 @@
+import { useValidator } from '@/components/providers/Validator/hooks/useValidator';
+
+export const SubmitButton = () => {
+ const { validate } = useValidator();
+
+ const handleSubmit = (e: React.FormEvent) => {
+ const isValid = validate();
+
+ if (!isValid) {
+ e.preventDefault();
+ }
+ };
+
+ return (
+ //@ts-ignore
+
+ );
+};
diff --git a/apps/kyb-app/src/poc/SubmitButton/index.ts b/apps/kyb-app/src/poc/SubmitButton/index.ts
new file mode 100644
index 0000000000..bcd94ff82e
--- /dev/null
+++ b/apps/kyb-app/src/poc/SubmitButton/index.ts
@@ -0,0 +1 @@
+export * from './SubmitButton';
diff --git a/apps/kyb-app/src/poc/TextInput/TextInput.tsx b/apps/kyb-app/src/poc/TextInput/TextInput.tsx
new file mode 100644
index 0000000000..8590398b7c
--- /dev/null
+++ b/apps/kyb-app/src/poc/TextInput/TextInput.tsx
@@ -0,0 +1,31 @@
+import { UIElement } from '@/components/providers/Validator/hooks/useValidate/ui-element';
+import { useValidatedInput } from '@/components/providers/Validator/hooks/useValidatedInput';
+import { UIElementV2 } from '@/components/providers/Validator/types';
+import { Input } from '@ballerine/ui';
+import { set } from 'lodash';
+import { FunctionComponent, useCallback, useMemo } from 'react';
+
+export interface ITextInputProps {
+ context: object;
+ element: UIElementV2;
+ stack?: number[];
+}
+
+export const TextInput: FunctionComponent = ({ context, element, stack = [] }) => {
+ const uiElement = useMemo(() => new UIElement(element, context, stack), [element, context]);
+ const validationError = useValidatedInput(uiElement);
+ const handleChange = useCallback(
+ (event: React.ChangeEvent) => {
+ set(context, uiElement.getValueDestination(), event.target.value);
+ },
+ [context, uiElement],
+ );
+
+ return (
+
+
+
+ {validationError && {validationError}}
+
+ );
+};
diff --git a/apps/kyb-app/src/poc/TextInput/index.ts b/apps/kyb-app/src/poc/TextInput/index.ts
new file mode 100644
index 0000000000..a7fcf6f39c
--- /dev/null
+++ b/apps/kyb-app/src/poc/TextInput/index.ts
@@ -0,0 +1 @@
+export * from './TextInput';
diff --git a/apps/kyb-app/src/router.tsx b/apps/kyb-app/src/router.tsx
index a1f7eb83fc..9595e1df21 100644
--- a/apps/kyb-app/src/router.tsx
+++ b/apps/kyb-app/src/router.tsx
@@ -3,6 +3,9 @@ import { CollectionFlow } from '@/pages/CollectionFlow';
import { Approved } from '@/pages/CollectionFlow/components/pages/Approved';
import { Rejected } from '@/pages/CollectionFlow/components/pages/Rejected';
import { SignIn } from '@/pages/SignIn';
+import { ValidatorPOC } from '@/ValidatorPOC';
+import * as Sentry from '@sentry/react';
+import React from 'react';
import {
createBrowserRouter,
createRoutesFromChildren,
@@ -10,8 +13,6 @@ import {
useLocation,
useNavigationType,
} from 'react-router-dom';
-import * as Sentry from '@sentry/react';
-import React from 'react';
export const sentyRouterInstrumentation = Sentry.reactRouterV6Instrumentation(
React.useEffect,
@@ -40,4 +41,8 @@ export const router = sentryCreateBrowserRouter([
path: 'approved',
Component: withTokenProtected(Approved),
},
+ {
+ path: 'poc',
+ Component: ValidatorPOC,
+ },
]);
diff --git a/services/workflows-service/prisma/data-migrations b/services/workflows-service/prisma/data-migrations
index 46f7e2631f..b5b8cded73 160000
--- a/services/workflows-service/prisma/data-migrations
+++ b/services/workflows-service/prisma/data-migrations
@@ -1 +1 @@
-Subproject commit 46f7e2631f901b2746852f49b43ef7c2e5dbe5ea
+Subproject commit b5b8cded73bdeafe792b5e5cb51780ae8a2c58a7