From 352ce3ae1a7cd37d8977e5939a2b802d5e5b2506 Mon Sep 17 00:00:00 2001 From: mayuran-deriv Date: Wed, 7 May 2025 15:25:45 +0400 Subject: [PATCH 1/3] fix: change validation --- src/features/dashboard/types.ts | 6 +++++- src/features/dashboard/update-app/AppUpdateForm/index.tsx | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/features/dashboard/types.ts b/src/features/dashboard/types.ts index f42f573b..1a4c5615 100644 --- a/src/features/dashboard/types.ts +++ b/src/features/dashboard/types.ts @@ -37,7 +37,11 @@ const base_schema = { message: 'Your website URL cannot exceed 255 characters.', }), ) - .notRequired() + .required( + translate({ + message: 'Redirect URL is required to enable OAuth on your app.', + }), + ) .matches(urlRegex, { message: translate({ message: 'Enter a valid URL. (Example: https://www.[YourDomainName].com)', diff --git a/src/features/dashboard/update-app/AppUpdateForm/index.tsx b/src/features/dashboard/update-app/AppUpdateForm/index.tsx index 161fcbef..e3c5c1c0 100644 --- a/src/features/dashboard/update-app/AppUpdateForm/index.tsx +++ b/src/features/dashboard/update-app/AppUpdateForm/index.tsx @@ -76,7 +76,7 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm setIsAdminPopupVisible(false); setValue('admin', true, { shouldValidate: true, shouldDirty: true }); }; - + console.log(errors); return (
@@ -113,7 +113,8 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm {' '} + linkTo='https://developers.deriv.com' + /> . Date: Wed, 7 May 2025 15:27:50 +0400 Subject: [PATCH 2/3] fix: remove console --- src/features/dashboard/update-app/AppUpdateForm/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/features/dashboard/update-app/AppUpdateForm/index.tsx b/src/features/dashboard/update-app/AppUpdateForm/index.tsx index e3c5c1c0..f02af919 100644 --- a/src/features/dashboard/update-app/AppUpdateForm/index.tsx +++ b/src/features/dashboard/update-app/AppUpdateForm/index.tsx @@ -76,7 +76,6 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm setIsAdminPopupVisible(false); setValue('admin', true, { shouldValidate: true, shouldDirty: true }); }; - console.log(errors); return (
From 17de631cd08df1c50dceb7c6a5ac1fe8b4930c7b Mon Sep 17 00:00:00 2001 From: mayuran-deriv Date: Wed, 7 May 2025 16:45:18 +0400 Subject: [PATCH 3/3] fix: added validation text --- src/features/dashboard/update-app/AppUpdateForm/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/dashboard/update-app/AppUpdateForm/index.tsx b/src/features/dashboard/update-app/AppUpdateForm/index.tsx index f02af919..d2856f0c 100644 --- a/src/features/dashboard/update-app/AppUpdateForm/index.tsx +++ b/src/features/dashboard/update-app/AppUpdateForm/index.tsx @@ -90,7 +90,7 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm