Skip to content

Commit

Permalink
bugfix: 数据库账号的端口可以输入负数 TencentBlueKing#1446
Browse files Browse the repository at this point in the history
bugfix: 本地文件上传大小限制可以输入负数 TencentBlueKing#1445
  • Loading branch information
jsonwan committed Nov 11, 2022
1 parent 44570e7 commit e267cdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
Expand Down Expand Up @@ -81,6 +82,7 @@ public class AccountCreateUpdateReq {
private String password;

@ApiModelProperty(value = "DB端口,创建/更新DB账号的时候必传")
@NotNull(message = "{validation.constraints.InvalidPort.message}")
@Range(min = 0, max = 65535, message = "{validation.constraints.InvalidPort.message}")
private Integer dbPort;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;
import java.util.List;
Expand All @@ -48,6 +49,7 @@
@ApiModel("文件上传参数")
public class FileUploadSettingReq {
@ApiModelProperty("数量")
@NotNull(message = "{validation.constraints.InvalidFileUploadSettingAmount.message}")
@Positive(message = "{validation.constraints.InvalidFileUploadSettingAmount.message}")
private Float amount;

Expand Down

0 comments on commit e267cdf

Please sign in to comment.