You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "healchow (via GitHub)" <gi...@apache.org> on 2023/04/24 09:34:21 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #7891: [INLONG-7890][Manager] Add checks for unmodifiable data_node_name and cluster_name

healchow commented on code in PR #7891:
URL: https://github.com/apache/inlong/pull/7891#discussion_r1175027272


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterRequest.java:
##########
@@ -48,11 +48,12 @@ public abstract class ClusterRequest {
     private Integer id;
 
     @ApiModelProperty(value = "Cluster name")
-    @NotBlank(groups = {SaveValidation.class, UpdateByKeyValidation.class}, message = "cluster name cannot be blank")
-    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
-    @Pattern(regexp = "^[a-z0-9_.-]{1,128}$", message = "only supports lowercase letters, numbers, '.', '-', or '_'")
+    @Pattern(regexp = "^[A-Za-z0-9_-]{1,128}$", message = "only supports letters, numbers, '-', or '_'")
     private String name;
 
+    @ApiModelProperty(value = "Cluster display name, just for display")
+    private String displayName;

Review Comment:
   Please add limit pattern here to avoid user input too long or other irregular characters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org