From 5f0af62521e6b56070b027086ace66b32c59fb6e Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Tue, 7 Mar 2023 23:44:26 +0200 Subject: [PATCH] fix(git): fix more files form error [EE-5125] (#8601) --- app/react/portainer/gitops/AdditionalFilesField.tsx | 12 ++++++++---- app/react/portainer/gitops/GitForm.tsx | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/react/portainer/gitops/AdditionalFilesField.tsx b/app/react/portainer/gitops/AdditionalFilesField.tsx index bbe1cd847..47d506fbb 100644 --- a/app/react/portainer/gitops/AdditionalFilesField.tsx +++ b/app/react/portainer/gitops/AdditionalFilesField.tsx @@ -35,8 +35,8 @@ function Item({ const { ref, updateCaret } = useCaretPosition(); return ( - <> - +
+ path - {error && {error}} - + {error && ( +
+ {error} +
+ )} +
); } diff --git a/app/react/portainer/gitops/GitForm.tsx b/app/react/portainer/gitops/GitForm.tsx index 468a6dff8..569ceef80 100644 --- a/app/react/portainer/gitops/GitForm.tsx +++ b/app/react/portainer/gitops/GitForm.tsx @@ -133,7 +133,7 @@ export function buildGitValidationSchema( ComposeFilePathInRepository: string().required( 'Compose file path is required' ), - AdditionalFiles: array(string().required()).default([]), + AdditionalFiles: array(string().required('Path is required')).default([]), RepositoryURLValid: boolean().default(false), AutoUpdate: autoUpdateValidation().nullable(), }).concat(gitAuthValidation(gitCredentials));