diff --git a/packages/ocs/storage-pool/body.tsx b/packages/ocs/storage-pool/body.tsx index a5fb18da8..929411e73 100644 --- a/packages/ocs/storage-pool/body.tsx +++ b/packages/ocs/storage-pool/body.tsx @@ -151,7 +151,10 @@ export const StoragePoolBody: React.FC = ({ .test( 'unique-name', translationFieldRequirements[3], - (value: string) => !existingNames.includes(value) + (value: string) => + !existingNames.includes( + usePrefix ? `${prefixName}-${value}` : value + ) ), }); @@ -159,7 +162,7 @@ export const StoragePoolBody: React.FC = ({ schema: validationSchema, fieldRequirements: translationFieldRequirements, }; - }, [existingNames, t]); + }, [prefixName, usePrefix, existingNames, t]); const resolver = useYupValidationResolver(schema); const {