diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2020-12-17 20:25:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-12-17 20:25:44 +0000 |
commit | 2f551ba584dbb70568a69144b39e6da7c55c517f (patch) | |
tree | 36eddf85671851202344e4612225e3ae564ee030 | |
parent | d5f3589fc6d464a9ffc94095f2903c09935841a8 (diff) | |
parent | f4ad471f83a09db2efaa3ca6943507f92b72299a (diff) |
Merge "Update to name and version regex for PM Update request Issue-ID: DCAEGEN2-1867"
-rw-r--r-- | mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java index 08d1e65..611a686 100644 --- a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java @@ -38,7 +38,7 @@ import javax.validation.constraints.Size; @NoArgsConstructor public class PolicyModelUpdateRequest { - @Pattern(regexp = "^([a-z0-9](-[a-z0-9])*)+$", message = "Policy Model name is invalid. Accepts alphanumerics and hyphens.") + @Pattern(regexp = "^([a-zA-Z0-9]([.|-][a-zA-Z0-9])*)+", message = "Policy Model name is invalid. Accepts alphanumerics, Dot(.) and hyphens.") @Size(min = 5, max = 50, message = "Policy Model name length cannot exceed 50 characters") private String name; @@ -46,7 +46,7 @@ public class PolicyModelUpdateRequest { private String owner; - @Pattern(regexp = "[0-9].[0-9].[0-9]", message = "Policy Model version is invalid. Should be in x.x.x format.") + @Pattern(regexp = "[0-9][.][0-9][.][0-9]", message = "Policy Model version is invalid. Should be in x.x.x format.") private String version; private MetadataRequest metadata; |