Merge pull request 'fix(制品库优化): 修复产品版本标签正则表达式错误的问题' (#833) from otto/microservices:product_refact into product_refact

This commit is contained in:
otto 2025-03-03 10:35:31 +08:00
commit d759a5d913
4 changed files with 7 additions and 6 deletions

View File

@ -100,7 +100,7 @@ public class PmsProductLibraryRepositories extends BaseEntity {
private String version;
@ApiModelProperty(value = "产品版本标")
@ApiModelProperty(value = "产品版本标")
private String tag;
public RepoAttributesVo getRepoAttributes() {

View File

@ -58,6 +58,6 @@ public class PmsProductLibraryDataVo {
private String version;
@ApiModelProperty(value = "产品版本标")
@ApiModelProperty(value = "产品版本标")
private String tag;
}

View File

@ -29,6 +29,6 @@ public class PmsProductLibrarySimpleVo extends PmsProductLibraryRepositoriesSimp
private String version;
@ApiModelProperty(value = "产品版本标")
@ApiModelProperty(value = "产品版本标")
private String tag;
}

View File

@ -17,9 +17,10 @@ import javax.validation.constraints.Pattern;
@Data
@ApiModel("产品库输入对象")
public class ProductRepositoriesInputVo extends ProductRepositoriesOperateVo {
@ApiModelProperty(value = "产品版本标记", required = true)
@NotBlank(message = "产品版本标记不能为空")
@Pattern(regexp = "^[A-Za-z0-9](?!_)(?!\\.)[A-Za-z0-9_\\-.]*$", message = "产品版本标记不符合规范")
// 必填以字母数字开头由字母数字下划线(_)短横线(-)(.)组成
@ApiModelProperty(value = "产品版本标签", required = true)
@NotBlank(message = "产品版本标签不能为空")
@Pattern(regexp = "^[A-Za-z0-9][A-Za-z0-9_\\-.]*$", message = "产品版本标签不符合规范")
private String tag;
@ApiModelProperty(value = "产品库名称", required = true)