From 23df3484fac0cc66ff3907997db7d0893673fdc9 Mon Sep 17 00:00:00 2001 From: Anatoli Kalbasin Date: Thu, 25 Jul 2024 16:19:58 +0200 Subject: [PATCH] remove validation error --- .../org/zowe/zdevops/classic/steps/DeleteDatasetStep.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/zowe/zdevops/classic/steps/DeleteDatasetStep.kt b/src/main/kotlin/org/zowe/zdevops/classic/steps/DeleteDatasetStep.kt index b353360..6974e54 100644 --- a/src/main/kotlin/org/zowe/zdevops/classic/steps/DeleteDatasetStep.kt +++ b/src/main/kotlin/org/zowe/zdevops/classic/steps/DeleteDatasetStep.kt @@ -22,7 +22,6 @@ import org.zowe.zdevops.Messages import org.zowe.zdevops.classic.AbstractBuildStep import org.zowe.zdevops.logic.deleteDatasetOrMember import org.zowe.zdevops.utils.validateDatasetName -import org.zowe.zdevops.utils.validateFieldIsNotEmpty import org.zowe.zdevops.utils.validateMemberName class DeleteDatasetStep @@ -68,10 +67,14 @@ constructor( * Checks if the member name is valid * * @param member The dataset member name - * @return FormValidation.ok() if the member name is valid, or an error message otherwise + * @return FormValidation.ok() if either the member name is valid or is not provided, or an error message otherwise */ fun doCheckMember(@QueryParameter member: String): FormValidation? { - return validateMemberName(member)?: validateFieldIsNotEmpty(member) + return if (member.isNotBlank()) { + validateMemberName(member) + } else { + FormValidation.ok() + } } } } \ No newline at end of file