Skip to content

Commit

Permalink
remove validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
callbacksin committed Jul 25, 2024
1 parent 929add1 commit 23df348
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}
}
}
}

0 comments on commit 23df348

Please sign in to comment.