private bool ValidateInput() { if (String.IsNullOrEmpty(Version)) { UserPromptUtils.ErrorPrompt(Resources.FlexPublishEmptyVersionMessage, Resources.UiInvalidValueTitle); return(false); } if (!GcpPublishStepsUtils.IsValidName(Version)) { UserPromptUtils.ErrorPrompt( String.Format(Resources.FlexPublishInvalidVersionMessage, Version), Resources.UiInvalidValueTitle); return(false); } return(true); }
private bool ValidateInput() { int replicas; if (!int.TryParse(Replicas, out replicas)) { UserPromptUtils.ErrorPrompt(Resources.GkePublishInvalidReplicasMessage, Resources.UiInvalidValueTitle); return(false); } if (String.IsNullOrEmpty(DeploymentName)) { UserPromptUtils.ErrorPrompt(Resources.GkePublishEmptyDeploymentNameMessage, Resources.UiInvalidValueTitle); return(false); } if (!GcpPublishStepsUtils.IsValidName(DeploymentName)) { UserPromptUtils.ErrorPrompt( String.Format(Resources.GkePublishInvalidDeploymentNameMessage, DeploymentName), Resources.UiInvalidValueTitle); return(false); } if (String.IsNullOrEmpty(DeploymentVersion)) { UserPromptUtils.ErrorPrompt(Resources.GkePublishEmptyDeploymentVersionMessage, Resources.UiInvalidValueTitle); return(false); } if (!GcpPublishStepsUtils.IsValidName(DeploymentVersion)) { UserPromptUtils.ErrorPrompt( String.Format(Resources.GkePublishInvalidDeploymentVersionMessage, DeploymentVersion), Resources.UiInvalidValueTitle); return(false); } return(true); }