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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to